Move some extension methods to a better location
This commit is contained in:
parent
92243cd393
commit
8c4e0f1203
|
@ -206,5 +206,16 @@ namespace BizHawk.Common.ReflectionExtensions
|
|||
return (IntPtr)dyn.Invoke(null, new object[] { new object() });
|
||||
}
|
||||
|
||||
public static bool ThrowsError(this MethodInfo info)
|
||||
{
|
||||
var il = info.GetMethodBody().GetILAsByteArray();
|
||||
return (il[il.Length - 1] == 0x7A);
|
||||
}
|
||||
|
||||
public static bool IsEmpty(this MethodInfo info)
|
||||
{
|
||||
var il = info.GetMethodBody().GetILAsByteArray();
|
||||
return (il.Length == 1 && il[0] == 0x2A);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,18 +22,6 @@ namespace BizHawk.Emulation.Common.IEmulatorExtensions
|
|||
return !info.GetCustomAttributes(false).OfType<FeatureNotImplemented>().Any();
|
||||
}
|
||||
|
||||
public static bool ThrowsError(this MethodInfo info)
|
||||
{
|
||||
var il = info.GetMethodBody().GetILAsByteArray();
|
||||
return (il[il.Length - 1] == 0x7A);
|
||||
}
|
||||
|
||||
public static bool IsEmpty(this MethodInfo info)
|
||||
{
|
||||
var il = info.GetMethodBody().GetILAsByteArray();
|
||||
return (il.Length == 1 && il[0] == 0x2A);
|
||||
}
|
||||
|
||||
public static bool IsImplemented(this PropertyInfo info)
|
||||
{
|
||||
return !info.GetCustomAttributes(false).OfType<FeatureNotImplemented>().Any();
|
||||
|
|
Loading…
Reference in New Issue