本文整理汇总了C#中IModule.ResolveMethod方法的典型用法代码示例。如果您正苦于以下问题:C# IModule.ResolveMethod方法的具体用法?C# IModule.ResolveMethod怎么用?C# IModule.ResolveMethod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IModule
的用法示例。
在下文中一共展示了IModule.ResolveMethod方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OpCodes
//.........这里部分代码省略.........
bytes = ReadBytes(enumerator, 8, ref currentAddress);
var @double = BitConverter.ToDouble(bytes, 0);
yield return new OpCodeDoublePart(opCode, startAddress, currentAddress, @double);
continue;
case Code.Ldstr:
// read token, next
token = ReadInt32(enumerator, ref currentAddress);
var @string = module.ResolveString(token);
yield return new OpCodeStringPart(opCode, startAddress, currentAddress, @string);
continue;
case Code.Newobj:
// read token, next
token = ReadInt32(enumerator, ref currentAddress);
var constructor = module.ResolveMember(token, genericContext) as IConstructor;
this.AddGenericSpecializedType(constructor.DeclaringType);
this.AddGenericSpecializedMethod(constructor, stackCall);
foreach (var methodParameter in constructor.GetParameters())
{
this.AddStructType(methodParameter.ParameterType);
}
this.AddUsedType(constructor.DeclaringType);
this.AddCalledMethod(constructor);
yield return new OpCodeConstructorInfoPart(opCode, startAddress, currentAddress, constructor);
continue;
case Code.Call:
case Code.Callvirt:
// read token, next
token = ReadInt32(enumerator, ref currentAddress);
var method = module.ResolveMethod(token, genericContext);
this.AddGenericSpecializedType(method.DeclaringType);
this.AddGenericSpecializedMethod(method, stackCall);
foreach (var methodParameter in method.GetParameters())
{
this.AddStructType(methodParameter.ParameterType);
}
this.AddUsedType(method.DeclaringType);
this.AddCalledMethod(method);
yield return new OpCodeMethodInfoPart(opCode, startAddress, currentAddress, method);
continue;
case Code.Ldftn:
case Code.Ldvirtftn:
// read token, next
token = ReadInt32(enumerator, ref currentAddress);
method = module.ResolveMethod(token, genericContext);
this.AddGenericSpecializedType(method.DeclaringType);
this.AddGenericSpecializedMethod(method, stackCall);
this.AddUsedType(method.DeclaringType);
yield return new OpCodeMethodInfoPart(opCode, startAddress, currentAddress, method);
continue;
case Code.Stfld:
case Code.Stsfld:
case Code.Ldfld:
case Code.Ldflda:
case Code.Ldsfld:
case Code.Ldsflda: