private static void ReadMethods(TypeDefinition type) { Collection <MethodDefinition> methods = type.Methods; for (int i = 0; i < methods.Count; i++) { MethodDefinition item = methods[i]; ImmediateModuleReader.ReadGenericParameters(item); if (item.HasParameters) { ImmediateModuleReader.ReadParameters(item); } if (item.HasOverrides) { ImmediateModuleReader.Read(item.Overrides); } if (item.IsPInvokeImpl) { ImmediateModuleReader.Read(item.PInvokeInfo); } ImmediateModuleReader.ReadSecurityDeclarations(item); ImmediateModuleReader.ReadCustomAttributes(item); MethodReturnType methodReturnType = item.MethodReturnType; if (methodReturnType.HasConstant) { ImmediateModuleReader.Read(methodReturnType.Constant); } if (methodReturnType.HasMarshalInfo) { ImmediateModuleReader.Read(methodReturnType.MarshalInfo); } ImmediateModuleReader.ReadCustomAttributes(methodReturnType); } }
private static void ReadType(TypeDefinition type) { ImmediateModuleReader.ReadGenericParameters(type); if (type.HasInterfaces) { ImmediateModuleReader.Read(type.Interfaces); } if (type.HasNestedTypes) { ImmediateModuleReader.ReadTypes(type.NestedTypes); } if (type.HasLayoutInfo) { ImmediateModuleReader.Read(type.ClassSize); } if (type.HasFields) { ImmediateModuleReader.ReadFields(type); } if (type.HasMethods) { ImmediateModuleReader.ReadMethods(type); } if (type.HasProperties) { ImmediateModuleReader.ReadProperties(type); } if (type.HasEvents) { ImmediateModuleReader.ReadEvents(type); } ImmediateModuleReader.ReadSecurityDeclarations(type); ImmediateModuleReader.ReadCustomAttributes(type); }