1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
//
// System.Reflection/MonoMethod.cs
// The class used to represent methods from the mono runtime.
//
// Author:
// Paolo Molaro (lupus@ximian.com)
//
// (C) 2001 Ximian, Inc. http://www.ximian.com
//
using System;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace System.Reflection {
internal class MonoArrayMethod: MethodInfo {
internal RuntimeMethodHandle mhandle;
internal Type parent;
internal Type ret;
internal Type[] parameters;
internal string name;
internal int table_idx;
internal CallingConventions call_conv;
internal MonoArrayMethod (Type arrayClass, string methodName, CallingConventions callingConvention, Type returnType, Type[] parameterTypes) {
name = methodName;
parent = arrayClass;
ret = returnType;
parameters = (Type[])parameterTypes.Clone();
call_conv = callingConvention;
}
[MonoTODO]
public override MethodInfo GetBaseDefinition() {
return this; /* FIXME */
}
public override Type ReturnType {
get {
return ret;
}
}
[MonoTODO]
public override ICustomAttributeProvider ReturnTypeCustomAttributes {
get {return null;}
}
[MonoTODO]
public override MethodImplAttributes GetMethodImplementationFlags() {
return (MethodImplAttributes)0;
}
[MonoTODO]
public override ParameterInfo[] GetParameters() {
return new ParameterInfo [0];
}
[MonoTODO]
public override Object Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) {
throw new NotImplementedException ();
}
public override RuntimeMethodHandle MethodHandle {
get {return mhandle;}
}
[MonoTODO]
public override MethodAttributes Attributes {
get {
return (MethodAttributes)0;
}
}
public override Type ReflectedType {
get {
return parent;
}
}
public override Type DeclaringType {
get {
return parent;
}
}
public override string Name {
get {
return name;
}
}
public override bool IsDefined (Type attributeType, bool inherit) {
return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
}
public override object[] GetCustomAttributes( bool inherit) {
return MonoCustomAttrs.GetCustomAttributes (this, inherit);
}
public override object[] GetCustomAttributes( Type attributeType, bool inherit) {
return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
}
public override string ToString () {
string parms = "";
ParameterInfo[] p = GetParameters ();
for (int i = 0; i < p.Length; ++i) {
if (i > 0)
parms = parms + ", ";
parms = parms + p [i].ParameterType.Name;
}
return ReturnType.Name+" "+Name+"("+parms+")";
}
}
}
|