Merge pull request #487 from mayerwin/patch-1
[mono.git] / mcs / class / corlib / System.Runtime.InteropServices / _Type.cs
1 //
2 // System.Runtime.InteropServices._Type interface
3 //
4 // Author:
5 //   Kazuki Oikawa  (kazuki@panicode.com)
6 //
7
8 using System;
9 using System.Globalization;
10 using System.Reflection;
11
12 namespace System.Runtime.InteropServices
13 {
14         [CLSCompliant (false)]
15         [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
16         [Guid ("BCA8B44D-AAD6-3A86-8AB7-03349F4F2DA2")]
17 #if !FULL_AOT_RUNTIME
18         [TypeLibImportClass (typeof (Type))]
19 #endif
20         [ComVisible (true)]
21         public interface _Type
22         {
23                 bool Equals (object other);
24
25                 bool Equals (Type o);
26
27                 Type[] FindInterfaces (TypeFilter filter, object filterCriteria);
28
29                 MemberInfo[] FindMembers (MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria);
30
31                 int GetArrayRank ();
32
33                 ConstructorInfo GetConstructor (Type[] types);
34
35                 ConstructorInfo GetConstructor (BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers);
36
37                 ConstructorInfo GetConstructor (BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers);
38
39                 ConstructorInfo[] GetConstructors ();
40
41                 ConstructorInfo[] GetConstructors (BindingFlags bindingAttr);
42
43                 object[] GetCustomAttributes (bool inherit);
44
45                 object[] GetCustomAttributes (Type attributeType, bool inherit);
46
47                 MemberInfo[] GetDefaultMembers ();
48
49                 Type GetElementType ();
50
51                 EventInfo GetEvent (string name);
52
53                 EventInfo GetEvent (string name, BindingFlags bindingAttr);
54
55                 EventInfo[] GetEvents ();
56
57                 EventInfo[] GetEvents (BindingFlags bindingAttr);
58
59                 FieldInfo GetField (string name);
60
61                 FieldInfo GetField (string name, BindingFlags bindingAttr);
62
63                 FieldInfo[] GetFields ();
64
65                 FieldInfo[] GetFields (BindingFlags bindingAttr);
66
67                 int GetHashCode ();
68
69                 void GetIDsOfNames ([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId);
70
71                 void GetTypeInfo (uint iTInfo, uint lcid, IntPtr ppTInfo);
72
73                 void GetTypeInfoCount (out uint pcTInfo);
74
75                 void Invoke (uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams,
76                         IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr);
77
78                 Type GetInterface (string name);
79
80                 Type GetInterface (string name, bool ignoreCase);
81
82                 InterfaceMapping GetInterfaceMap (Type interfaceType);
83
84                 Type[] GetInterfaces ();
85
86                 MemberInfo[] GetMember (string name);
87
88                 MemberInfo[] GetMember (string name, MemberTypes type, BindingFlags bindingAttr);
89
90                 MemberInfo[] GetMember (string name, BindingFlags bindingAttr);
91
92                 MemberInfo[] GetMembers ();
93
94                 MemberInfo[] GetMembers (BindingFlags bindingAttr);
95
96                 MethodInfo GetMethod (string name);
97
98                 MethodInfo GetMethod (string name, BindingFlags bindingAttr);
99
100                 MethodInfo GetMethod (string name, Type[] types);
101
102                 MethodInfo GetMethod (string name, Type[] types, ParameterModifier[] modifiers);
103
104                 MethodInfo GetMethod (string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers);
105
106                 MethodInfo GetMethod (string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers);
107
108                 MethodInfo[] GetMethods ();
109
110                 MethodInfo[] GetMethods (BindingFlags bindingAttr);
111
112                 Type GetNestedType (string name);
113
114                 Type GetNestedType (string name, BindingFlags bindingAttr);
115
116                 Type[] GetNestedTypes ();
117
118                 Type[] GetNestedTypes (BindingFlags bindingAttr);
119
120                 PropertyInfo[] GetProperties ();
121
122                 PropertyInfo[] GetProperties (BindingFlags bindingAttr);
123
124                 PropertyInfo GetProperty (string name);
125
126                 PropertyInfo GetProperty (string name, BindingFlags bindingAttr);
127
128                 PropertyInfo GetProperty (string name, Type returnType);
129
130                 PropertyInfo GetProperty (string name, Type[] types);
131
132                 PropertyInfo GetProperty (string name, Type returnType, Type[] types);
133
134                 PropertyInfo GetProperty (string name, Type returnType, Type[] types, ParameterModifier[] modifiers);
135
136                 PropertyInfo GetProperty (string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers);
137
138                 Type GetType ();
139
140                 object InvokeMember (string name, BindingFlags invokeAttr, Binder binder, object target, object[] args);
141
142                 object InvokeMember (string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, CultureInfo culture);
143
144                 object InvokeMember (string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters);
145
146                 bool IsAssignableFrom (Type c);
147
148                 bool IsDefined (Type attributeType, bool inherit);
149
150                 bool IsInstanceOfType (object o);
151
152                 bool IsSubclassOf (Type c);
153
154                 string ToString ();
155
156                 Assembly Assembly {get;}
157
158                 string AssemblyQualifiedName {get;}
159
160                 TypeAttributes Attributes {get;}
161
162                 Type BaseType {get;}
163
164                 Type DeclaringType {get;}
165
166                 string FullName {get;}
167
168                 Guid GUID {get;}
169
170                 bool HasElementType {get;}
171
172                 bool IsAbstract {get;}
173
174                 bool IsAnsiClass {get;}
175
176                 bool IsArray {get;}
177
178                 bool IsAutoClass {get;}
179
180                 bool IsAutoLayout {get;}
181
182                 bool IsByRef {get;}
183
184                 bool IsClass {get;}
185
186                 bool IsCOMObject {get;}
187
188                 bool IsContextful {get;}
189
190                 bool IsEnum {get;}
191
192                 bool IsExplicitLayout {get;}
193
194                 bool IsImport {get;}
195
196                 bool IsInterface {get;}
197
198                 bool IsLayoutSequential {get;}
199
200                 bool IsMarshalByRef {get;}
201
202                 bool IsNestedAssembly {get;}
203
204                 bool IsNestedFamANDAssem {get;}
205
206                 bool IsNestedFamily {get;}
207
208                 bool IsNestedFamORAssem {get;}
209
210                 bool IsNestedPrivate {get;}
211
212                 bool IsNestedPublic {get;}
213
214                 bool IsNotPublic {get;}
215
216                 bool IsPointer {get;}
217
218                 bool IsPrimitive {get;}
219
220                 bool IsPublic {get;}
221
222                 bool IsSealed {get;}
223
224                 bool IsSerializable {get;}
225
226                 bool IsSpecialName {get;}
227
228                 bool IsUnicodeClass {get;}
229
230                 bool IsValueType {get;}
231
232                 MemberTypes MemberType {get;}
233
234                 Module Module {get;}
235
236                 string Name {get;}
237
238                 string Namespace {get;}
239
240                 Type ReflectedType {get;}
241
242                 RuntimeTypeHandle TypeHandle {get;}
243
244                 ConstructorInfo TypeInitializer {get;}
245
246                 Type UnderlyingSystemType {get;}
247         }
248 }