private void ReadMethods(TypeDefinition type) { Collection <MethodDefinition> methods = type.Methods; for (int i = 0; i < methods.Count; i++) { MethodDefinition methodDefinition = methods[i]; this.ReadGenericParameters(methodDefinition); if (methodDefinition.HasParameters) { this.ReadParameters(methodDefinition); } if (methodDefinition.HasOverrides) { ImmediateModuleReader.Read(methodDefinition.Overrides); } if (methodDefinition.IsPInvokeImpl) { ImmediateModuleReader.Read(methodDefinition.PInvokeInfo); } this.ReadSecurityDeclarations(methodDefinition); this.ReadCustomAttributes(methodDefinition); MethodReturnType methodReturnType = methodDefinition.MethodReturnType; if (methodReturnType.HasConstant) { ImmediateModuleReader.Read(methodReturnType.Constant); } if (methodReturnType.HasMarshalInfo) { ImmediateModuleReader.Read(methodReturnType.MarshalInfo); } this.ReadCustomAttributes(methodReturnType); } }
public MethodReference(string name, TypeReference returnType) : base(name) { if (returnType == null) { throw new ArgumentNullException("returnType"); } this.return_type = new MethodReturnType(this); this.return_type.ReturnType = returnType; this.token = new MetadataToken(TokenType.MemberRef); }
internal MethodReference() { this.return_type = new MethodReturnType(this); this.token = new MetadataToken(TokenType.MemberRef); }