コード例 #1
0
            private void ExtractEnum(Cci.INamedTypeDefinition typedef)
            {
                var name = typedef.Name.Value;
                var type = new EnumDefinition(name);

                type.UnderlayingType = TypesExtractor.ExtractType(typedef.UnderlyingType) as BasicType;
                this.ExtractConstants(type.Constants, typedef.Fields);

                types.Add(name, type);
            }
コード例 #2
0
            private void ExtractInterface(Cci.INamedTypeDefinition typedef)
            {
                var name = typedef.Name.Value;
                var type = new InterfaceDefinition(name);

                this.ExtractGenericParameters(type.GenericParameters, typedef.GenericParameters);
                this.ExtractInterfaces(type.Interfaces, typedef.Interfaces);
                this.ExtractMethods(type.Methods, typedef.Methods);

                types.Add(name, type);
            }
コード例 #3
0
            private void ExtractStruct(Cci.INamedTypeDefinition typedef)
            {
                var name = typedef.Name.Value;
                var type = new StructDefinition(name);

                this.ExtractGenericParameters(type.GenericParameters, typedef.GenericParameters);
                this.ExtractFields(type.Fields, typedef.Fields);
                this.ExtractMethods(type.Methods, typedef.Methods);

                types.Add(name, type);
            }
コード例 #4
0
            private void ExtractClass(Cci.INamedTypeDefinition typedef)
            {
                var name = typedef.Name.Value;
                var type = new ClassDefinition(name);

                Cci.ITypeReference basedef = Cci.TypeHelper.BaseClass(typedef);

                if (basedef == null)
                {
                    basedef = host.PlatformType.SystemObject;
                }

                type.Base = TypesExtractor.ExtractType(basedef) as BasicType;

                this.ExtractGenericParameters(type.GenericParameters, typedef.GenericParameters);
                this.ExtractInterfaces(type.Interfaces, typedef.Interfaces);
                this.ExtractFields(type.Fields, typedef.Fields);
                this.ExtractMethods(type.Methods, typedef.Methods);

                types.Add(name, type);
            }
コード例 #5
0
            public override void TraverseChildren(Cci.INamedTypeDefinition typedef)
            {
                if (typedef.IsClass)
                {
                    this.ExtractClass(typedef);
                }
                else if (typedef.IsInterface)
                {
                    this.ExtractInterface(typedef);
                }
                else if (typedef.IsStruct)
                {
                    this.ExtractStruct(typedef);
                }
                else if (typedef.IsEnum)
                {
                    this.ExtractEnum(typedef);
                }

                base.TraverseChildren(typedef);
            }
コード例 #6
0
 public void Inspect(cci.IAssembly assembly, cci.INamedTypeDefinition type, cci.IMethodDefinition method, cci.PdbReader symbol)
 {
     data.MethodInfo info = new data.MethodInfo();
     info.MethodCalls = ParseMethodCalls(method);
 }
コード例 #7
0
 public void Inspect(cci.IAssembly assembly, cci.INamedTypeDefinition type, cci.PdbReader symbol)
 {
 }