private int GetToken(System.Reflection.MethodBase method)
{
if (method is System.Reflection.Emit.DynamicMethod)
return this.dynamicILInfo.GetTokenFor((System.Reflection.Emit.DynamicMethod)method);
if (method.DeclaringType == null)
throw new ArgumentException("The provided method cannot be that of an RTDynamicMethod. Use the DynamicMethod instead.");
if (method.DeclaringType.IsGenericType == true)
return this.dynamicILInfo.GetTokenFor(method.MethodHandle, method.DeclaringType.TypeHandle);
return this.dynamicILInfo.GetTokenFor(method.MethodHandle);
}