2002-01-04 Ravi Pratap <ravi@ximian.com>
[mono.git] / mcs / class / corlib / System.Reflection / Assembly.cs
1 //
2 // System.Reflection/Assembly.cs
3 //
4 // Author:
5 //   Paolo Molaro (lupus@ximian.com)
6 //
7 // (C) 2001 Ximian, Inc.  http://www.ximian.com
8 //
9
10 using System;
11 using System.Security.Policy;
12 using System.Runtime.Serialization;
13 using System.Reflection.Emit;
14 using System.IO;
15 using System.Globalization;
16 using System.Runtime.CompilerServices;
17
18 namespace System.Reflection {
19
20         public class Assembly : System.Reflection.ICustomAttributeProvider,
21                 System.Security.IEvidenceFactory, System.Runtime.Serialization.ISerializable {
22                 private IntPtr _mono_assembly;
23
24                 public virtual string CodeBase { get {return null;} }
25
26                 public virtual string CopiedCodeBase { get {return null;} } 
27
28                 public virtual string FullName { get {return null;} }
29
30                 public virtual MethodInfo EntryPoint { get {return null;} }
31
32                 public virtual Evidence Evidence { get {return null;} }
33
34                 public virtual String Location { get {return null;} }
35
36                 public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
37                 {
38                 }
39
40                 public virtual Boolean IsDefined(Type attributeType)
41                 {
42                         return false;
43                 }
44
45                 public virtual bool IsDefined (Type attribute_type, bool inherit)
46                 {
47                         return false;
48                 }
49
50                 public virtual Object[] GetCustomAttributes()
51                 {
52                         return null;
53                 }
54
55                 public virtual Object[] GetCustomAttributes(Type attributeType)
56                 {
57                         return null;
58                 }
59                 
60                 public virtual object [] GetCustomAttributes (bool inherit)
61                 {
62                         return null;
63                 }
64
65                 public virtual object [] GetCustomAttributes (Type attribute_type, bool inherit)
66                 {
67                         return null;
68                 }
69
70                 public virtual void RemoveOnTypeResolve(ResolveEventHandler handler)
71                 {
72                         throw new NotImplementedException ();
73                 }
74
75                 public virtual void AddOnTypeResolve(ResolveEventHandler handler)
76                 {
77                         throw new NotImplementedException ();
78                 }
79
80                 public virtual void RemoveOnResourceResolve(ResolveEventHandler handler)
81                 {
82                         throw new NotImplementedException ();
83                 }
84                 
85                 public virtual void AddOnResourceResolve(ResolveEventHandler handler)
86                 {
87                         throw new NotImplementedException ();
88                 }
89
90                 public virtual ModuleBuilder DefineDynamicModule(String name, Boolean emitSymbolInfo)
91                 {
92                         throw new NotImplementedException ();
93                 }
94
95                 public virtual ModuleBuilder DefineDynamicModule(String name)
96                 {
97                         throw new NotImplementedException ();
98                 }
99
100                 public virtual FileStream[] GetFiles()
101                 {
102                         throw new NotImplementedException ();
103                 }
104
105                 public virtual FileStream GetFile(String name)
106                 {
107                         throw new NotImplementedException ();
108                 }
109
110                 public virtual Stream GetManifestResourceStream(String name)
111                 {
112                         throw new NotImplementedException ();
113                 }
114
115                 public virtual Stream GetManifestResourceStream(Type type, String name)
116                 {
117                         throw new NotImplementedException ();
118                 }
119
120                 public virtual Type[] GetTypes()
121                 {
122                         throw new NotImplementedException ();
123                 }
124
125                 public virtual Type[] GetExportedTypes()
126                 {
127                         throw new NotImplementedException ();
128                 }
129
130                 public virtual Type GetType(String name, Boolean throwOnError)
131                 {
132                         return GetType (name, throwOnError, false);
133                 }
134
135                 [MethodImplAttribute(MethodImplOptions.InternalCall)]
136                 public extern virtual Type GetType(String name);
137
138                 public Type GetType(String name, Boolean throwOnError, Boolean ignoreCase)
139                 {
140                         throw new NotImplementedException ();
141                 }
142                 
143                 public virtual AssemblyName GetName(Boolean copiedName)
144                 {
145                         throw new NotImplementedException ();
146                 }
147
148                 public virtual AssemblyName GetName()
149                 {
150                         throw new NotImplementedException ();
151                 }
152
153                 public override String ToString()
154                 {
155                         return GetName ().Name;
156                 }
157
158                 [MonoTODO]
159                 public static String CreateQualifiedName(String assemblyName, String typeName) 
160                 {
161                         return "FIXME: assembly";
162                 }
163
164                 [MonoTODO]
165                 public static String nCreateQualifiedName(String assemblyName, String typeName)
166                 {
167                         return "FIXME: assembly";
168                 }
169
170                 [MonoTODO]
171                 public static Assembly GetAssembly(Type type)
172                 {
173                         throw new NotImplementedException ();
174                 }
175
176                 [MonoTODO]
177                 public Assembly GetSatelliteAssembly(CultureInfo culture)
178                 {
179                         throw new NotImplementedException ();
180                 }
181
182                 public static Assembly LoadFrom(String assemblyFile)
183                 {
184                         return LoadFrom (assemblyFile, new Evidence());
185                 }
186
187                 [MethodImplAttribute(MethodImplOptions.InternalCall)]
188                 public static extern Assembly LoadFrom(String assemblyFile, Evidence securityEvidence);
189
190                 public static Assembly Load(String assemblyString)
191                 {
192                         return LoadFrom (assemblyString, new Evidence());
193                 }
194                 
195                 public static Assembly Load(String assemblyString, Evidence assemblySecurity)
196                 {
197                         return LoadFrom (assemblyString, assemblySecurity);
198                 }
199
200                 public static Assembly Load(AssemblyName assemblyRef)
201                 {
202                         throw new NotImplementedException ();
203                 }
204
205                 public static Assembly Load(AssemblyName assemblyRef, Evidence assemblySecurity)
206                 {
207                         throw new NotImplementedException ();
208                 }
209
210                 public static Assembly Load(Byte[] rawAssembly)
211                 {
212                         throw new NotImplementedException ();
213                 }
214
215                 public static Assembly Load(Byte[] rawAssembly, Byte[] rawSymbolStore)
216                 {
217                         throw new NotImplementedException ();
218                 }
219
220                 public static Assembly Load(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence securityEvidence)
221                 {
222                         throw new NotImplementedException ();
223                 }
224
225                 public Object CreateInstance(String typeName) 
226                 {
227                         throw new NotImplementedException ();
228                 }
229
230                 public Object CreateInstance(String typeName, Boolean ignoreCase)
231                 {
232                         throw new NotImplementedException ();
233                 }
234
235                 public Object CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
236                 {
237                         throw new NotImplementedException ();
238                 }
239
240                 public Module[] GetLoadedModules()
241                 {
242                         throw new NotImplementedException ();
243                 }
244
245                 public Module[] GetModules()
246                 {
247                         throw new NotImplementedException ();
248                 }
249
250                 public Module GetModule(String name)
251                 {
252                         throw new NotImplementedException ();
253                 }
254
255                 public String[] GetManifestResourceNames()
256                 {
257                         throw new NotImplementedException ();
258                 }
259
260                 public static Assembly GetExecutingAssembly()
261                 {
262                         throw new NotImplementedException ();
263                 }
264
265                 public AssemblyName[] GetReferencedAssemblies()
266                 {
267                         throw new NotImplementedException ();
268                 }
269
270                 public ManifestResourceInfo GetManifestResourceInfo(String resourceName)
271                 {
272                         throw new NotImplementedException ();
273                 }
274
275                 public static Assembly Load(AssemblyName assemblyRef, Evidence assemblySecurity, String callerLocation)
276                 {
277                         throw new NotImplementedException ();
278                 }
279
280                 public static Assembly Load(String assemblyString, Evidence assemblySecurity, String callerLocation)
281                 {
282                         throw new NotImplementedException ();
283                 }
284
285         }
286 }