Esempio n. 1
0
 public EnumValue(uint value, string name, string?documentation, DeprecatedInfo deprecatedInfo)
 {
     DeclaringType  = null !;
     Value          = value;
     RawName        = name;
     Documentation  = documentation;
     DeprecatedInfo = deprecatedInfo;
 }
Esempio n. 2
0
 public EnumValue(uint value, string name, string?documentation, DeprecatedInfo deprecatedInfo)
 {
     DeclaringType = null !;
     Value         = value;
     RawName       = name;
     if (deprecatedInfo.IsDeprecated && deprecatedInfo.NewName is null && documentation is null)
     {
         Documentation = "Don't use it!";
     }
Esempio n. 3
0
 public Constant(ConstantKind kind, string name, ulong value, ConstantsTypeFlags flags, string?documentation, DeprecatedInfo deprecatedInfo)
 {
     DeclaringType  = null !;
     Kind           = kind;
     RawName        = name;
     Documentation  = documentation;
     DeprecatedInfo = deprecatedInfo;
     ValueUInt64    = value;
     RefValue       = null;
     IsPublic       = (flags & ConstantsTypeFlags.Public) != 0;
     UseHex         = (flags & ConstantsTypeFlags.Hex) != 0;
 }
Esempio n. 4
0
 public Constant(ConstantKind kind, string name, object value, ConstantsTypeFlags flags, string?documentation, DeprecatedInfo deprecatedInfo)
 {
     if (value is not null && value.GetType().IsValueType)
     {
         throw new ArgumentException();
     }
     DeclaringType  = null !;
     Kind           = kind;
     RawName        = name;
     Documentation  = documentation;
     DeprecatedInfo = deprecatedInfo;
     ValueUInt64    = 0;
     RefValue       = value;
     IsPublic       = (flags & ConstantsTypeFlags.Public) != 0;
     UseHex         = (flags & ConstantsTypeFlags.Hex) != 0;
 }
Esempio n. 5
0
 public EnumValue(uint value, string name, LanguageDocumentation documentation, DeprecatedInfo deprecatedInfo)
 {
     DeclaringType = null !;
     Value         = value;
     RawName       = name;
     if (deprecatedInfo.IsDeprecated && deprecatedInfo.NewName is null && !documentation.HasDefaultComment)
     {
         Documentation = new("Don't use it!");
     }