2 // System.Reflection/MonoMethod.cs
3 // The class used to represent methods from the mono runtime.
6 // Paolo Molaro (lupus@ximian.com)
8 // (C) 2001 Ximian, Inc. http://www.ximian.com
12 using System.Globalization;
13 using System.Runtime.CompilerServices;
14 using System.Runtime.InteropServices;
16 namespace System.Reflection {
17 internal class MonoArrayMethod: MethodInfo {
18 internal RuntimeMethodHandle mhandle;
21 internal Type[] parameters;
23 internal int table_idx;
24 internal CallingConventions call_conv;
26 internal MonoArrayMethod (Type arrayClass, string methodName, CallingConventions callingConvention, Type returnType, Type[] parameterTypes) {
30 parameters = (Type[])parameterTypes.Clone();
31 call_conv = callingConvention;
35 public override MethodInfo GetBaseDefinition() {
36 return this; /* FIXME */
38 public override Type ReturnType {
44 public override ICustomAttributeProvider ReturnTypeCustomAttributes {
49 public override MethodImplAttributes GetMethodImplementationFlags() {
50 return (MethodImplAttributes)0;
54 public override ParameterInfo[] GetParameters() {
55 return new ParameterInfo [0];
59 public override Object Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) {
60 throw new NotImplementedException ();
63 public override RuntimeMethodHandle MethodHandle {
67 public override MethodAttributes Attributes {
69 return (MethodAttributes)0;
73 public override Type ReflectedType {
78 public override Type DeclaringType {
83 public override string Name {
89 public override bool IsDefined (Type attributeType, bool inherit) {
90 return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
93 public override object[] GetCustomAttributes( bool inherit) {
94 return MonoCustomAttrs.GetCustomAttributes (this, inherit);
96 public override object[] GetCustomAttributes( Type attributeType, bool inherit) {
97 return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
100 public override string ToString () {
102 ParameterInfo[] p = GetParameters ();
103 for (int i = 0; i < p.Length; ++i) {
105 parms = parms + ", ";
106 parms = parms + p [i].ParameterType.Name;
108 return ReturnType.Name+" "+Name+"("+parms+")";
112 public override Type[] GetGenericArguments ()
114 throw new NotImplementedException ();