public Constant(ConstantKind kind, string name, ulong value, ConstantsTypeFlags flags = ConstantsTypeFlags.None, string?documentation = null) { DeclaringType = null !; Kind = kind; RawName = name; Documentation = documentation; ValueUInt64 = value; RefValue = null; IsPublic = (flags & ConstantsTypeFlags.Public) != 0; UseHex = (flags & ConstantsTypeFlags.Hex) != 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; }
public ConstantsType(string name, TypeId typeId, ConstantsTypeFlags flags, string?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 = ConstantsTypeFlags.None, string?documentation = null) { if (!(value is null) && value.GetType().IsValueType) { throw new ArgumentException(); } DeclaringType = null !; Kind = kind; RawName = name; Documentation = documentation; ValueUInt64 = 0; RefValue = value; 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 ConstantsType(TypeId typeId, ConstantsTypeFlags flags, string?documentation, Constant[] constants) : this(typeId.ToString(), typeId, flags, documentation, constants) { }
public Constant(ConstantKind kind, string name, ulong value, ConstantsTypeFlags flags = ConstantsTypeFlags.None) : this(kind, name, value, flags, null, default) { }
public Constant(ConstantKind kind, string name, object value, ConstantsTypeFlags flags = ConstantsTypeFlags.None) : this(kind, name, value, flags, default, default) { }