コード例 #1
0
ファイル: ConstantsType.cs プロジェクト: 5l1v3r1/iced-1
 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;
 }
コード例 #2
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;
 }
コード例 #3
0
ファイル: ConstantsType.cs プロジェクト: 5l1v3r1/iced-1
        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);
            }
        }
コード例 #4
0
ファイル: ConstantsType.cs プロジェクト: 5l1v3r1/iced-1
 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;
 }
コード例 #5
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;
 }
コード例 #6
0
ファイル: ConstantsType.cs プロジェクト: 5l1v3r1/iced-1
 public ConstantsType(TypeId typeId, ConstantsTypeFlags flags, string?documentation, Constant[] constants)
     : this(typeId.ToString(), typeId, flags, documentation, constants)
 {
 }
コード例 #7
0
 public Constant(ConstantKind kind, string name, ulong value, ConstantsTypeFlags flags = ConstantsTypeFlags.None)
     : this(kind, name, value, flags, null, default)
 {
 }
コード例 #8
0
ファイル: ConstantsType.cs プロジェクト: icedland/iced
 public Constant(ConstantKind kind, string name, object value, ConstantsTypeFlags flags = ConstantsTypeFlags.None)
     : this(kind, name, value, flags, default, default)
 {
 }