Inheritance: TargetEnumType
コード例 #1
0
ファイル: MonoMember.cs プロジェクト: atomia/mono_debugger
        public MonoEnumInfo(MonoEnumType type, TargetType field_type, int index, int pos,
				     Cecil.FieldDefinition finfo)
            : base(field_type, finfo.Name, index, finfo.IsStatic,
				MonoFieldInfo.GetAccessibility (finfo),
				pos, 0, finfo.HasConstant)
        {
            FieldInfo = finfo;
        }
コード例 #2
0
ファイル: MonoMember.cs プロジェクト: tralivali1234/debugger
 public MonoEnumInfo(MonoEnumType type, TargetType field_type, int index, int pos,
                     Cecil.FieldDefinition finfo)
     : base(field_type, finfo.Name, index, finfo.IsStatic,
            MonoFieldInfo.GetAccessibility(finfo),
            pos, 0, finfo.HasConstant)
 {
     FieldInfo = finfo;
 }
コード例 #3
0
        public TargetType LookupMonoType(Cecil.TypeReference type)
        {
            TargetType result = (TargetType) type_hash [type];
            if (result != null)
                return result;

            if (type is Cecil.ArrayType) {
                Cecil.ArrayType atype = (Cecil.ArrayType) type;
                TargetType element_type = LookupMonoType (atype.ElementType);
                result = new MonoArrayType (element_type, atype.Rank);
            } else if (type is Cecil.TypeDefinition) {
                Cecil.TypeDefinition tdef = (Cecil.TypeDefinition) type;
                if (tdef.IsEnum)
                    result = new MonoEnumType (this, tdef);
                else
                    result = new MonoClassType (this, tdef);
            } else {
                Console.WriteLine ("UNKNOWN TYPE: {0} {1}", type, type.GetType ());
                return null;
            }

            if (!type_hash.Contains (type))
                type_hash.Add (type, result);
            return result;
        }