You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 0a113cb3a6feb7873f632839b1307cc6033cd595
This commit is contained in:
committed by
Jo Shields
parent
183bba2c9a
commit
6992685b86
63
mcs/class/corlib/ReferenceSources/MethodBase.cs
Normal file
63
mcs/class/corlib/ReferenceSources/MethodBase.cs
Normal file
@ -0,0 +1,63 @@
|
||||
#if !FULL_AOT_RUNTIME
|
||||
using System.Reflection.Emit;
|
||||
#endif
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace System.Reflection
|
||||
{
|
||||
partial class MethodBase
|
||||
{
|
||||
//
|
||||
// This is a quick version for our own use. We should override
|
||||
// it where possible so that it does not allocate an array.
|
||||
// They cannot be abstract otherwise we break public contract
|
||||
//
|
||||
internal virtual ParameterInfo[] GetParametersInternal ()
|
||||
{
|
||||
// Override me
|
||||
return GetParameters ();
|
||||
}
|
||||
|
||||
internal virtual int GetParametersCount ()
|
||||
{
|
||||
// Override me
|
||||
return GetParametersInternal ().Length;
|
||||
}
|
||||
|
||||
internal virtual Type GetParameterType (int pos)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
internal virtual int get_next_table_index (object obj, int table, bool inc) {
|
||||
#if !FULL_AOT_RUNTIME
|
||||
if (this is MethodBuilder) {
|
||||
MethodBuilder mb = (MethodBuilder)this;
|
||||
return mb.get_next_table_index (obj, table, inc);
|
||||
}
|
||||
if (this is ConstructorBuilder) {
|
||||
ConstructorBuilder mb = (ConstructorBuilder)this;
|
||||
return mb.get_next_table_index (obj, table, inc);
|
||||
}
|
||||
#endif
|
||||
throw new Exception ("Method is not a builder method");
|
||||
}
|
||||
|
||||
internal static MethodBase GetMethodFromHandleNoGenericCheck (RuntimeMethodHandle handle)
|
||||
{
|
||||
return GetMethodFromHandleInternalType (handle.Value, IntPtr.Zero);
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
internal extern static MethodBody GetMethodBodyInternal (IntPtr handle);
|
||||
|
||||
internal static MethodBody GetMethodBody (IntPtr handle)
|
||||
{
|
||||
return GetMethodBodyInternal (handle);
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
extern static MethodBase GetMethodFromHandleInternalType (IntPtr method_handle, IntPtr type_handle);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user