You've already forked linux-packaging-mono
Imported Upstream version 6.4.0.137
Former-commit-id: 943baa9f16a098c33e129777827f3a9d20da00d6
This commit is contained in:
parent
e9207cf623
commit
ef583813eb
@ -0,0 +1,74 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
namespace System.Reflection
|
||||
{
|
||||
partial class MethodBase
|
||||
{
|
||||
public static MethodBase GetMethodFromHandle (RuntimeMethodHandle handle)
|
||||
{
|
||||
if (handle.IsNullHandle ())
|
||||
throw new ArgumentException (SR.Argument_InvalidHandle);
|
||||
|
||||
MethodBase m = RuntimeMethodInfo.GetMethodFromHandleInternalType (handle.Value, IntPtr.Zero);
|
||||
if (m == null)
|
||||
throw new ArgumentException (SR.Argument_InvalidHandle);
|
||||
|
||||
Type declaringType = m.DeclaringType;
|
||||
if (declaringType != null && declaringType.IsGenericType)
|
||||
throw new ArgumentException (String.Format (SR.Argument_MethodDeclaringTypeGeneric,
|
||||
m, declaringType.GetGenericTypeDefinition ()));
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
public static MethodBase GetMethodFromHandle (RuntimeMethodHandle handle, RuntimeTypeHandle declaringType)
|
||||
{
|
||||
if (handle.IsNullHandle ())
|
||||
throw new ArgumentException (SR.Argument_InvalidHandle);
|
||||
MethodBase m = RuntimeMethodInfo.GetMethodFromHandleInternalType (handle.Value, declaringType.Value);
|
||||
if (m == null)
|
||||
throw new ArgumentException (SR.Argument_InvalidHandle);
|
||||
return m;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
public extern static MethodBase GetCurrentMethod ();
|
||||
|
||||
internal virtual ParameterInfo[] GetParametersNoCopy ()
|
||||
{
|
||||
return GetParametersInternal ();
|
||||
}
|
||||
|
||||
internal virtual ParameterInfo[] GetParametersInternal ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
internal virtual int GetParametersCount ()
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
internal virtual Type GetParameterType (int pos)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
internal virtual Type[] GetParameterTypes ()
|
||||
{
|
||||
ParameterInfo[] paramInfo = GetParametersNoCopy ();
|
||||
|
||||
Type[] parameterTypes = new Type [paramInfo.Length];
|
||||
for (int i = 0; i < paramInfo.Length; i++)
|
||||
parameterTypes [i] = paramInfo [i].ParameterType;
|
||||
|
||||
return parameterTypes;
|
||||
}
|
||||
|
||||
internal virtual int get_next_table_index (object obj, int table, int count)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user