Merge pull request #1898 from alexanderkyte/debugger_variable_reflection
[mono.git] / mcs / class / corlib / System.Reflection.Emit / MethodOnTypeBuilderInst.cs
index df2d4bae011ba9c04631d459a2a0463fd31a4706..41a79eb6d7e560e48797c385a6804d1f51070533 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !FULL_AOT_RUNTIME
 using System;
 using System.Globalization;
 using System.Reflection;
 using System.Text;
+using System.Runtime.InteropServices;
+
 
 namespace System.Reflection.Emit
 {
        /*
         * This class represents a method of an instantiation of a generic type builder.
         */
+       [StructLayout (LayoutKind.Sequential)]
        internal class MethodOnTypeBuilderInst : MethodInfo
        {
                #region Keep in sync with object-internals.h
@@ -124,6 +128,12 @@ namespace System.Reflection.Emit
                        }
                }
 
+               public override Module Module {
+                       get {
+                               return base_method.Module;
+                       }
+               }
+
                public override bool IsDefined (Type attributeType, bool inherit)
                {
                        throw new NotSupportedException ();
@@ -159,6 +169,11 @@ namespace System.Reflection.Emit
                }
 
                public override ParameterInfo [] GetParameters ()
+               {
+                       return GetParametersInternal ();
+               }
+
+               internal override ParameterInfo [] GetParametersInternal ()
                {
                        throw new NotSupportedException ();
                }
@@ -169,9 +184,9 @@ namespace System.Reflection.Emit
                        }
                }
 
-               internal override int GetParameterCount ()
+               internal override int GetParametersCount ()
                {
-                       return base_method.GetParameterCount ();
+                       return base_method.GetParametersCount ();
                }
 
                public override Object Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
@@ -276,3 +291,4 @@ namespace System.Reflection.Emit
        }
 }
 
+#endif