示例#1
0
 public EnumValue(uint value, string name, string?documentation, DeprecatedInfo deprecatedInfo)
 {
     DeclaringType  = null !;
     Value          = value;
     RawName        = name;
     Documentation  = documentation;
     DeprecatedInfo = deprecatedInfo;
 }
示例#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!";
     }
示例#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;
 }
示例#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;
 }
示例#5
0
文件: EnumType.cs 项目: icedland/iced
 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!");
     }