2004-04-07 Martin Baulig <martin@ximian.com>
[mono.git] / mcs / class / corlib / System.Reflection.Emit / EnumBuilder.cs
1
2 //
3 // System.Reflection.Emit/EnumBuilder.cs
4 //
5 // Author:
6 //   Paolo Molaro (lupus@ximian.com)
7 //
8 // (C) 2001 Ximian, Inc.  http://www.ximian.com
9 //
10
11 using System;
12 using System.Reflection;
13 using System.Reflection.Emit;
14 using System.Globalization;
15 using System.Runtime.CompilerServices;
16
17 namespace System.Reflection.Emit {
18         public sealed class EnumBuilder : Type {
19                 CustomAttributeBuilder[] cattrs;
20
21                 public override Assembly Assembly {
22                         get { return null; }
23                 }
24                 public override string AssemblyQualifiedName {
25                         get { return null; }
26                 }
27                 public override Type BaseType {
28                         get { return null; }
29                 }
30                 public override Type DeclaringType {
31                         get { return null; }
32                 }
33                 public override string FullName {
34                         get { return null; }
35                 }
36                 public override Guid GUID {
37                         get { return Guid.Empty; }
38                 }
39                 public override Module Module {
40                         get { return null; }
41                 }
42                 public override string Name {
43                         get { return null; }
44                 }
45                 public override string Namespace {
46                         get { return null; }
47                 }
48                 public override Type ReflectedType {
49                         get { return null; }
50                 }
51                 public override RuntimeTypeHandle TypeHandle {
52                         get { return new RuntimeTypeHandle (); }
53                 }
54                 public TypeToken TypeToken {
55                         get { return new TypeToken (); }
56                 }
57                 public FieldBuilder UnderlyingField {
58                         get { return null; }
59                 }
60                 public override Type UnderlyingSystemType {
61                         get { return null; }
62                 }
63 /* no need to override
64                 public override MemberTypes MemberType {
65                         get {return MemberTypes.TypeInfo;}
66                 }
67 */
68
69                 internal EnumBuilder (ModuleBuilder mb, string name, TypeAttributes visibility, Type underlyingType)
70                 {
71                 }
72
73                 public Type CreateType ()
74                 {
75                         return null;
76                 }
77
78                 public FieldBuilder DefineLiteral (string literalName, object literalValue)
79                 {
80                         return null;
81                 }
82                 protected override TypeAttributes GetAttributeFlagsImpl ()
83                 {
84                         return (TypeAttributes)0;
85                 }
86
87                 protected override ConstructorInfo GetConstructorImpl (
88                         BindingFlags bindingAttr, Binder binder, CallingConventions cc,
89                         Type[] types, ParameterModifier[] modifiers)
90                 {
91                         return null;
92                 }
93
94                 public override ConstructorInfo[] GetConstructors( BindingFlags bindingAttr)
95                 {
96                         return null;
97                 }
98
99                 public override object[] GetCustomAttributes(bool inherit)
100                 {
101                         return null;
102                 }
103
104                 public override object[] GetCustomAttributes(Type attributeType, bool inherit)
105                 {
106                         return null;
107                 }
108
109                 public override Type GetElementType()
110                 {
111                         throw new NotSupportedException ();
112                 }
113
114                 public override EventInfo GetEvent( string name, BindingFlags bindingAttr)
115                 {
116                         return null;
117                 }
118
119                 public override EventInfo[] GetEvents()
120                 {
121                         return null;
122                 }
123
124                 public override EventInfo[] GetEvents( BindingFlags bindingAttr)
125                 {
126                         return null;
127                 }
128
129                 public override FieldInfo GetField( string name, BindingFlags bindingAttr)
130                 {
131                         return null;
132                 }
133
134                 public override FieldInfo[] GetFields( BindingFlags bindingAttr)
135                 {
136                         return null;
137                 }
138
139                 public override Type GetInterface( string name, bool ignoreCase)
140                 {
141                         return null;
142                 }
143
144                 public override InterfaceMapping GetInterfaceMap( Type interfaceType)
145                 {
146                         throw new NotImplementedException ();
147                 }
148
149                 public override Type[] GetInterfaces()
150                 {
151                         return null;
152                 }
153
154                 public override MemberInfo[] GetMember( string name, MemberTypes type, BindingFlags bindingAttr)
155                 {
156                         return null;
157                 }
158
159                 public override MemberInfo[] GetMembers( BindingFlags bindingAttr)
160                 {
161                         return null;
162                 }
163
164                 protected override MethodInfo GetMethodImpl (
165                         string name, BindingFlags bindingAttr, Binder binder,
166                         CallingConventions callConvention, Type[] types,
167                         ParameterModifier[] modifiers)
168                 {
169                         // FIXME
170                         return null;
171                 }
172                 
173                 public override MethodInfo[] GetMethods( BindingFlags bindingAttr)
174                 {
175                         return null;
176                 }
177
178                 public override Type GetNestedType( string name, BindingFlags bindingAttr)
179                 {
180                         return null;
181                 }
182
183                 public override Type[] GetNestedTypes( BindingFlags bindingAttr)
184                 {
185                         return null;
186                 }
187
188                 public override PropertyInfo[] GetProperties( BindingFlags bindingAttr)
189                         {
190                         return null;
191                 }
192
193                 protected override PropertyInfo GetPropertyImpl (
194                         string name, BindingFlags bindingAttr, Binder binder,
195                         Type returnType, Type[] types,
196                         ParameterModifier[] modifiers)
197                 {
198                         return null;
199                 }
200
201                 protected override bool HasElementTypeImpl()
202                         {
203                         throw new NotSupportedException ();
204                 }
205
206                 public override object InvokeMember (
207                         string name, BindingFlags invokeAttr, Binder binder,
208                         object target, object[] args,
209                         ParameterModifier[] modifiers, CultureInfo culture,
210                         string[] namedParameters)
211                 {
212                         return null;
213                 }
214
215                 protected override bool IsArrayImpl()
216                 {
217                         return false;
218                 }
219
220                 protected override bool IsByRefImpl()
221                 {
222                         return false;
223                 }
224
225                 protected override bool IsCOMObjectImpl()
226                 {
227                         return false;
228                 }
229
230                 protected override bool IsPointerImpl()
231                 {
232                         return false;
233                 }
234
235                 protected override bool IsPrimitiveImpl()
236                 {
237                         return false;
238                 }
239                 
240                 protected override bool IsValueTypeImpl()
241                 {
242                         return true;
243                 }
244
245                 public override bool IsDefined( Type attributeType, bool inherit)
246                 {
247                         return false;
248                 }
249                 
250                 public void SetCustomAttribute( CustomAttributeBuilder customBuilder)
251                 {
252                         if (cattrs != null) {
253                                 CustomAttributeBuilder[] new_array = new CustomAttributeBuilder [cattrs.Length + 1];
254                                 cattrs.CopyTo (new_array, 0);
255                                 new_array [cattrs.Length] = customBuilder;
256                                 cattrs = new_array;
257                         } else {
258                                 cattrs = new CustomAttributeBuilder [1];
259                                 cattrs [0] = customBuilder;
260                         }
261                 }
262
263                 public void SetCustomAttribute( ConstructorInfo con, byte[] binaryAttribute)
264                 {
265                         SetCustomAttribute (new CustomAttributeBuilder (con, binaryAttribute));
266                 }
267
268 #if NET_1_2
269                 public override Type[] GetGenericArguments ()
270                 {
271                         throw new NotImplementedException ();
272                 }
273
274                 public override bool HasGenericArguments {
275                         get {
276                                 throw new NotImplementedException ();
277                         }
278                 }
279
280                 public override bool ContainsGenericParameters {
281                         get {
282                                 throw new NotImplementedException ();
283                         }
284                 }
285
286                 public override bool IsGenericParameter {
287                         get {
288                                 throw new NotImplementedException ();
289                         }
290                 }
291
292                 public override int GenericParameterPosition {
293                         get {
294                                 throw new NotImplementedException ();
295                         }
296                 }
297
298                 public override MethodInfo DeclaringMethod {
299                         get {
300                                 throw new NotImplementedException ();
301                         }
302                 }
303 #endif
304         }
305 }