本文整理匯總了C#中Mono.ILASM.CodeGen.ResolveVarargMethod方法的典型用法代碼示例。如果您正苦於以下問題:C# CodeGen.ResolveVarargMethod方法的具體用法?C# CodeGen.ResolveVarargMethod怎麽用?C# CodeGen.ResolveVarargMethod使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Mono.ILASM.CodeGen
的用法示例。
在下文中一共展示了CodeGen.ResolveVarargMethod方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Resolve
public override void Resolve (CodeGen code_gen)
{
if (is_resolved)
return;
if ((call_conv & PEAPI.CallConv.Vararg) == 0) {
string sig = MethodDef.CreateSignature (ret_type, call_conv, name, param, gen_param_count, false);
peapi_method = code_gen.ResolveMethod (sig);
} else {
ArrayList opt_list = new ArrayList ();
bool in_opt = false;
foreach (BaseTypeRef type in param) {
if (type is SentinelTypeRef) {
in_opt = true;
} else if (in_opt) {
type.Resolve (code_gen);
opt_list.Add (type.PeapiType);
}
}
string sig_only_required_params = MethodDef.CreateSignature (ret_type, call_conv, name, param, gen_param_count, false);
string sig_with_optional_params = MethodDef.CreateSignature (ret_type, call_conv, name, param, gen_param_count, true);
peapi_method = code_gen.ResolveVarargMethod (sig_only_required_params, sig_with_optional_params, code_gen,
(PEAPI.Type[]) opt_list.ToArray (typeof (PEAPI.Type)));
}
peapi_method.AddCallConv (call_conv);
is_resolved = true;
}