[corlib]Implement .net 4.0 ParameterInfo.
[mono.git] / mcs / class / corlib / System.Reflection.Emit / MonoArrayMethod.cs
index 2a487430dcb7680190a1dcf7b32d187c4cf31a9e..aa24bc34719719e1a239956278473190950c3331 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.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
 namespace System.Reflection {
+       [StructLayout (LayoutKind.Sequential)]
        internal class MonoArrayMethod: MethodInfo {
+#pragma warning disable 649
                internal RuntimeMethodHandle mhandle;
                internal Type parent;
                internal Type ret;
@@ -45,6 +48,7 @@ namespace System.Reflection {
                internal string name;
                internal int table_idx;
                internal CallingConventions call_conv;
+#pragma warning restore 649            
 
                internal MonoArrayMethod (Type arrayClass, string methodName, CallingConventions callingConvention, Type returnType, Type[] parameterTypes) {
                        name = methodName;
@@ -75,10 +79,22 @@ namespace System.Reflection {
                }
 
                [MonoTODO("Not implemented.  Always returns an empty array")]
-               public override ParameterInfo[] GetParameters() {
-                       return new ParameterInfo [0];
+               public override ParameterInfo[] GetParameters()
+               {
+                       return GetParametersInternal ();                        
                }
 
+               internal override ParameterInfo[] GetParametersInternal ()
+               {
+                       return EmptyArray<ParameterInfo>.Value;
+               }       
+               
+               [MonoTODO("Not implemented.  Always returns 0")]
+               internal override int GetParametersCount ()
+               {
+                       return 0;
+               }               
+
                [MonoTODO("Not implemented")]
                public override Object Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) {
                        throw new NotImplementedException ();
@@ -137,3 +153,4 @@ namespace System.Reflection {
                }
        }
 }
+#endif