예제 #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!");
     }