1 // 2 // Copyright (c) 2010-2024 Antmicro 3 // 4 // This file is licensed under the MIT License. 5 // Full license text is available in 'licenses/MIT.txt'. 6 // 7 using System; 8 9 namespace Antmicro.Renode.Peripherals 10 { 11 /// <summary> 12 /// This attribute provides an alternative name that a constructor 13 /// parameter or enum type can be referred to in REPL. 14 /// </summary> 15 [AttributeUsage(AttributeTargets.Enum | AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)] 16 public class NameAliasAttribute : Attribute 17 { NameAliasAttribute(string name, bool warnOnUsage = true)18 public NameAliasAttribute(string name, bool warnOnUsage = true) 19 { 20 Name = name; 21 WarnOnUsage = warnOnUsage; 22 } 23 24 public string Name { get; } 25 public bool WarnOnUsage { get; } 26 } 27 } 28