2004-01-25 Martin Baulig <martin@ximian.com>
[mono.git] / mcs / class / corlib / System.Reflection / TypeDelegator.cs
1 // System.Reflection/TypeDelegator.cs
2 //
3 // Paolo Molaro (lupus@ximian.com)
4 //
5 // (C) 2002 Ximian, Inc.
6
7 using System;
8 using System.Reflection;
9 using System.Globalization;
10
11 namespace System.Reflection {
12
13         [Serializable]
14         public class TypeDelegator : Type {
15                 protected Type typeImpl;
16         
17                 protected TypeDelegator () {
18                 }
19
20                 public TypeDelegator( Type delegatingType)
21                 {
22                         if (delegatingType == null)
23                                 throw new ArgumentNullException ("delegatingType must be non-null");
24                         typeImpl = delegatingType;
25                 }
26
27                 public override Assembly Assembly {
28                         get { return typeImpl.Assembly; }
29                 }
30
31                 public override string AssemblyQualifiedName {
32                         get { return typeImpl.AssemblyQualifiedName; }
33                 }
34
35                 public override Type BaseType {
36                         get { return typeImpl.BaseType; }
37                 }
38
39                 public override string FullName {
40                         get { return typeImpl.FullName; }
41                 }
42
43                 public override Guid GUID {
44                         get { return typeImpl.GUID; }
45                 }
46
47                 public override Module Module {
48                         get { return typeImpl.Module; }
49                 }
50
51                 public override string Name {
52                         get { return typeImpl.Name; }
53                 }
54
55                 public override string Namespace {
56                         get { return typeImpl.Namespace; }
57                 }
58
59                 public override RuntimeTypeHandle TypeHandle {
60                         get { return typeImpl.TypeHandle; }
61                 }
62
63                 public override Type UnderlyingSystemType {
64                         get { return typeImpl.UnderlyingSystemType; }
65                 }
66
67                 protected override TypeAttributes GetAttributeFlagsImpl ()
68                 {
69                         throw new NotImplementedException ();
70                         //return typeImpl.GetAttributeFlagsImpl ();
71                 }
72                 
73                 protected override ConstructorInfo GetConstructorImpl (
74                         BindingFlags bindingAttr, Binder binder, CallingConventions cc,
75                         Type[] types, ParameterModifier[] modifiers)
76                 {
77                         throw new NotImplementedException ();
78                         //return typeImpl.GetConstructorImpl (bindingAttr, binder, callConvention, types, modifiers);
79                 }
80
81                 public override ConstructorInfo[] GetConstructors( BindingFlags bindingAttr)
82                 {
83                         return typeImpl.GetConstructors (bindingAttr);
84                 }
85
86                 public override object[] GetCustomAttributes (bool inherit)
87                 {
88                         return typeImpl.GetCustomAttributes (inherit);
89                 }
90
91                 public override object[] GetCustomAttributes (Type attributeType, bool inherit)
92                 {
93                         return typeImpl.GetCustomAttributes (attributeType, inherit);
94                 }
95
96                 public override Type GetElementType()
97                 {
98                         return typeImpl.GetElementType ();
99                 }
100
101                 public override EventInfo GetEvent( string name, BindingFlags bindingAttr)
102                 {
103                         return typeImpl.GetEvent (name, bindingAttr);
104                 }
105
106                 public override EventInfo[] GetEvents()
107                 {
108                         return GetEvents (BindingFlags.Public);
109                 }
110
111                 public override EventInfo[] GetEvents (BindingFlags bindingAttr)
112                 {
113                         return typeImpl.GetEvents (bindingAttr);
114                 }
115
116                 public override FieldInfo GetField (string name, BindingFlags bindingAttr)
117                 {
118                         return typeImpl.GetField (name, bindingAttr);
119                 }
120
121                 public override FieldInfo[] GetFields( BindingFlags bindingAttr)
122                 {
123                         return typeImpl.GetFields (bindingAttr);
124                 }
125
126                 public override Type GetInterface( string name, bool ignoreCase)
127                 {
128                         return typeImpl.GetInterface (name, ignoreCase);
129                 }
130
131                 public override InterfaceMapping GetInterfaceMap( Type interfaceType)
132                 {
133                         return typeImpl.GetInterfaceMap (interfaceType);
134                 }
135                 
136                 public override Type[] GetInterfaces ()
137                 {
138                         return typeImpl.GetInterfaces ();
139                 }
140
141                 public override MemberInfo[] GetMember( string name, MemberTypes type, BindingFlags bindingAttr)
142                 {
143                         return typeImpl.GetMember (name, type, bindingAttr);
144                 }
145
146                 public override MemberInfo[] GetMembers( BindingFlags bindingAttr)
147                 {
148                         return typeImpl.GetMembers (bindingAttr);
149                 }
150
151                 protected override MethodInfo GetMethodImpl( string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
152                 {
153                         throw new NotImplementedException ();
154                         //return typeImpl.GetMethodImpl (name, bindingAttr, binder, callConvention, types, modifiers);
155                 }
156
157                 public override MethodInfo[] GetMethods( BindingFlags bindingAttr)
158                 {
159                         return typeImpl.GetMethods (bindingAttr);
160                 }
161
162                 public override Type GetNestedType( string name, BindingFlags bindingAttr)
163                 {
164                         return typeImpl.GetNestedType (name, bindingAttr);
165                 }
166
167                 public override Type[] GetNestedTypes( BindingFlags bindingAttr)
168                 {
169                         return typeImpl.GetNestedTypes (bindingAttr);
170                 }
171
172                 public override PropertyInfo[] GetProperties( BindingFlags bindingAttr)
173                 {
174                         return typeImpl.GetProperties (bindingAttr);
175                 }
176
177                 protected override PropertyInfo GetPropertyImpl( string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
178                 {
179                         throw new NotImplementedException ();
180                         //return typeImpl.GetPropertyImpl (name, bindingAttr, bindingAttr, returnType, types, modifiers);
181                 }
182
183                 protected override bool HasElementTypeImpl()
184                 {
185                         throw new NotImplementedException ();
186                         //return typeImpl.HasElementTypeImpl ();
187                 }
188
189                 public override object InvokeMember( string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters) {
190                         return typeImpl.InvokeMember (name, invokeAttr, binder, target, args, modifiers, culture, namedParameters);
191                 }
192
193                 protected override bool IsArrayImpl()
194                 {
195                         throw new NotImplementedException ();
196                         //return typeImpl.IsArrayImpl ();
197                 }
198
199                 protected override bool IsByRefImpl()
200                 {
201                         throw new NotImplementedException ();
202                         //return typeImpl.IsByRefImpl ();
203                 }
204
205                 protected override bool IsCOMObjectImpl()
206                 {
207                         throw new NotImplementedException ();
208                         //return typeImpl.IsCOMObjectImpl ();
209                 }
210
211                 public override bool IsDefined( Type attributeType, bool inherit) {
212                         return typeImpl.IsDefined (attributeType, inherit);
213                 }
214
215                 protected override bool IsPointerImpl()
216                 {
217                         throw new NotImplementedException ();
218                         //return typeImpl.IsPointerImpl ();
219                 }
220
221                 protected override bool IsPrimitiveImpl()
222                 {
223                         throw new NotImplementedException ();
224                         //return typeImpl.IsPrimitiveImpl ();
225                 }
226
227                 protected override bool IsValueTypeImpl()
228                 {
229                         throw new NotImplementedException ();
230                         //return typeImpl.IsValueTypeImpl ();
231                 }
232 #if NET_1_2
233                 public override bool HasGenericArguments {
234                         get {
235                                 throw new NotImplementedException ();
236                         }
237                 }
238
239                 public override bool ContainsGenericParameters {
240                         get {
241                                 throw new NotImplementedException ();
242                         }
243                 }
244
245                 public override bool IsGenericParameter {
246                         get {
247                                 throw new NotImplementedException ();
248                         }
249                 }
250
251                 public override int GenericParameterPosition {
252                         get {
253                                 throw new NotImplementedException ();
254                         }
255                 }
256
257                 public override MethodInfo DeclaringMethod {
258                         get {
259                                 throw new NotImplementedException ();
260                         }
261                 }
262 #endif
263
264         }
265 }