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!"); }
public EnumType(string name, TypeId typeId, LanguageDocumentation documentation, EnumValue[] values, EnumTypeFlags flags) { toEnumValue = new Dictionary <string, EnumValue>(values.Length, StringComparer.Ordinal); IsPublic = (flags & EnumTypeFlags.Public) != 0; IsFlags = (flags & EnumTypeFlags.Flags) != 0; TypeId = typeId; RawName = name; Documentation = documentation; this.values = values; initialized = (flags & EnumTypeFlags.NoInitialize) == 0; Initialize(values); }
public Constant(ConstantKind kind, string name, ulong value, ConstantsTypeFlags flags, LanguageDocumentation 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 ConstantsType(string name, TypeId typeId, ConstantsTypeFlags flags, LanguageDocumentation documentation, Constant[] constants) { toConstant = new Dictionary <string, Constant>(StringComparer.Ordinal); TypeId = typeId; RawName = name; Documentation = documentation; IsPublic = (flags & ConstantsTypeFlags.Public) != 0; Constants = constants; foreach (var constant in constants) { constant.DeclaringType = this; toConstant.Add(constant.RawName, constant); } }
public Constant(ConstantKind kind, string name, object value, ConstantsTypeFlags flags, LanguageDocumentation 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 EnumType(TypeId typeId, LanguageDocumentation documentation, EnumValue[] values, EnumTypeFlags flags) : this(typeId.ToString(), typeId, documentation, values, flags) { }
public EnumValue(uint value, string name, LanguageDocumentation documentation) : this(value, name, documentation, default) { }
public ConstantsType(TypeId typeId, ConstantsTypeFlags flags, LanguageDocumentation documentation, Constant[] constants) : this(typeId.ToString(), typeId, flags, documentation, constants) { }