public EnumValue(uint value, string name, string?documentation, DeprecatedInfo deprecatedInfo) { DeclaringType = null !; Value = value; RawName = name; Documentation = documentation; DeprecatedInfo = deprecatedInfo; }
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!"; }
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; }
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; }
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!"); }