public PEAPI.MethodDef Resolve (CodeGen code_gen, PEAPI.ClassDef classdef) { if (is_resolved) return methoddef; PEAPI.Param [] param_array = GenerateParams (code_gen); FixAttributes (); ret_param.Define (code_gen); if (classdef == null) methoddef = code_gen.PEFile.AddMethod (meth_attr, impl_attr, name, ret_param.PeapiParam, param_array); else methoddef = classdef.AddMethod (meth_attr, impl_attr, name, ret_param.PeapiParam, param_array); methoddef.AddCallConv (call_conv); is_resolved = true; return methoddef; }