|
|
@@ -202,6 +202,21 @@ namespace System.Reflection {
|
|
|
throw new NotSupportedException ();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ [MethodImplAttribute (MethodImplOptions.InternalCall)]
|
|
|
+ internal extern static MethodBody GetMethodBodyInternal (IntPtr handle);
|
|
|
+
|
|
|
+ internal static MethodBody GetMethodBody (IntPtr handle) {
|
|
|
+ MethodBody mb = GetMethodBodyInternal (handle);
|
|
|
+ if (mb == null)
|
|
|
+ throw new ArgumentException ("Only methods with IL bodies are supported.");
|
|
|
+ else
|
|
|
+ return mb;
|
|
|
+ }
|
|
|
+
|
|
|
+ public virtual MethodBody GetMethodBody () {
|
|
|
+ throw new NotSupportedException ();
|
|
|
+ }
|
|
|
#endif
|
|
|
}
|
|
|
}
|