Пример #1
0
        void AddModuleDefinition(ModuleDefinition moduleDefinition, bool loadInternal, bool instantiateTypeParameter)
        {
            InstantiatedParamResolver resolver = new InstantiatedParamResolver();
            Module module = new Module(moduleDefinition);

            foreach (TypeDefinition type in moduleDefinition.Types)
            {
                if (!loadInternal && IsInternal(DomCecilType.GetModifiers(type.Attributes)))
                {
                    continue;
                }
//				if (type.Name == "SimplePropertyDescriptor")
//					System.Console.WriteLine(type.Attributes + "/" + DomCecilType.GetModifiers (type.Attributes) + "/" + IsInternal (DomCecilType.GetModifiers (type.Attributes)));
                DomCecilType loadType = new DomCecilType(type, loadInternal, loadMonotouchDocumentation);
                if (instantiateTypeParameter)
                {
                    resolver.Visit(loadType, null);
                    resolver.ClearTypes();
                }
                loadMonotouchDocumentation &= loadType.LoadMonotouchDocumentation;
                Add(loadType);
                module.Types.Add(loadType);
            }
            this.modules.Add(module);
        }
Пример #2
0
        void AddModuleDefinition(ModuleDefinition moduleDefinition, bool loadInternal, bool instantiateTypeParameter)
        {
            InstantiatedParamResolver resolver = new InstantiatedParamResolver(xmlDocumentation);
            Module module = new Module(moduleDefinition);

            foreach (TypeDefinition type in moduleDefinition.Types)
            {
                // filter nested types, they're handled in DomCecilType.
                if ((type.Attributes & TypeAttributes.NestedPublic) == TypeAttributes.NestedPublic ||
                    (type.Attributes & TypeAttributes.NestedFamily) == TypeAttributes.NestedFamily ||
                    (type.Attributes & TypeAttributes.NestedAssembly) == TypeAttributes.NestedAssembly ||
                    (type.Attributes & TypeAttributes.NestedPrivate) == TypeAttributes.NestedPrivate ||
                    (type.Attributes & TypeAttributes.NestedFamANDAssem) == TypeAttributes.NestedFamANDAssem)
                {
                    continue;
                }
                if (!loadInternal && IsInternal(DomCecilType.GetModifiers(type.Attributes)))
                {
                    continue;
                }
//				if (type.Name == "SimplePropertyDescriptor")
//					System.Console.WriteLine(type.Attributes + "/" + DomCecilType.GetModifiers (type.Attributes) + "/" + IsInternal (DomCecilType.GetModifiers (type.Attributes)));
                DomCecilType loadType = new DomCecilType(type, loadInternal);
                if (instantiateTypeParameter)
                {
                    resolver.Visit(loadType, null);
                    resolver.ClearTypes();
                }
                Add(loadType);
                module.Types.Add(loadType);
            }
            this.modules.Add(module);
        }