2 // System.Reflection/Assembly.cs
5 // Paolo Molaro (lupus@ximian.com)
7 // (C) 2001 Ximian, Inc. http://www.ximian.com
11 using System.Security.Policy;
12 using System.Runtime.Serialization;
13 using System.Reflection.Emit;
15 using System.Globalization;
16 using System.Runtime.CompilerServices;
18 namespace System.Reflection {
20 public class Assembly : System.Reflection.ICustomAttributeProvider,
21 System.Security.IEvidenceFactory, System.Runtime.Serialization.ISerializable {
22 private IntPtr _mono_assembly;
24 [MethodImplAttribute (MethodImplOptions.InternalCall)]
25 private extern string get_code_base ();
27 public virtual string CodeBase {
29 return get_code_base ();
33 public virtual string CopiedCodeBase {
39 public virtual string FullName {
42 // FIXME: This is wrong, but it gets us going
43 // in the compiler for now
49 public virtual MethodInfo EntryPoint {
55 public virtual Evidence Evidence {
61 public virtual String Location {
67 public virtual void GetObjectData (SerializationInfo info, StreamingContext context)
71 public virtual Boolean IsDefined (Type attributeType)
76 public virtual bool IsDefined (Type attribute_type, bool inherit)
81 public virtual Object[] GetCustomAttributes ()
86 public virtual Object[] GetCustomAttributes (Type attributeType)
91 public virtual object [] GetCustomAttributes (bool inherit)
96 public virtual object [] GetCustomAttributes (Type attribute_type, bool inherit)
101 public virtual void RemoveOnTypeResolve (ResolveEventHandler handler)
103 throw new NotImplementedException ();
106 public virtual void AddOnTypeResolve (ResolveEventHandler handler)
108 throw new NotImplementedException ();
111 public virtual void RemoveOnResourceResolve (ResolveEventHandler handler)
113 throw new NotImplementedException ();
116 public virtual void AddOnResourceResolve (ResolveEventHandler handler)
118 throw new NotImplementedException ();
121 public virtual ModuleBuilder DefineDynamicModule (String name, Boolean emitSymbolInfo)
123 throw new NotImplementedException ();
126 public virtual ModuleBuilder DefineDynamicModule (String name)
128 throw new NotImplementedException ();
131 public virtual FileStream[] GetFiles ()
133 throw new NotImplementedException ();
136 public virtual FileStream GetFile (String name)
138 throw new NotImplementedException ();
141 public virtual Stream GetManifestResourceStream (String name)
143 throw new NotImplementedException ();
146 public virtual Stream GetManifestResourceStream (Type type, String name)
148 throw new NotImplementedException ();
151 public virtual Type[] GetTypes ()
153 throw new NotImplementedException ();
156 public virtual Type[] GetExportedTypes ()
158 throw new NotImplementedException ();
161 public virtual Type GetType (String name, Boolean throwOnError)
163 return GetType (name, throwOnError, false);
166 public virtual Type GetType (String name) {
167 return GetType (name, false, false);
170 [MethodImplAttribute (MethodImplOptions.InternalCall)]
171 public extern Type GetType (String name, Boolean throwOnError, Boolean ignoreCase);
173 public virtual AssemblyName GetName (Boolean copiedName)
175 throw new NotImplementedException ();
178 public virtual AssemblyName GetName ()
180 throw new NotImplementedException ();
183 public override String ToString ()
185 return GetName ().Name;
189 public static String CreateQualifiedName (String assemblyName, String typeName)
191 return "FIXME: assembly";
195 public static String nCreateQualifiedName (String assemblyName, String typeName)
197 return "FIXME: assembly";
201 public static Assembly GetAssembly (Type type)
203 throw new NotImplementedException ();
207 public Assembly GetSatelliteAssembly (CultureInfo culture)
209 throw new NotImplementedException ();
212 public static Assembly LoadFrom (String assemblyFile)
214 return AppDomain.CurrentDomain.Load (assemblyFile);
217 public static Assembly Load (String assemblyString)
219 return AppDomain.CurrentDomain.Load (assemblyString);
222 public static Assembly Load (String assemblyString, Evidence assemblySecurity)
224 return AppDomain.CurrentDomain.Load (assemblyString, assemblySecurity);
227 public static Assembly Load (AssemblyName assemblyRef)
229 return AppDomain.CurrentDomain.Load (assemblyRef);
232 public static Assembly Load (AssemblyName assemblyRef, Evidence assemblySecurity)
234 return AppDomain.CurrentDomain.Load (assemblyRef, assemblySecurity);
237 public static Assembly Load (Byte[] rawAssembly)
239 return AppDomain.CurrentDomain.Load (rawAssembly);
242 public static Assembly Load (Byte[] rawAssembly, Byte[] rawSymbolStore)
244 return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore);
247 public static Assembly Load (Byte[] rawAssembly, Byte[] rawSymbolStore,
248 Evidence securityEvidence)
250 return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore, securityEvidence);
253 public Object CreateInstance (String typeName)
255 throw new NotImplementedException ();
258 public Object CreateInstance (String typeName, Boolean ignoreCase)
260 throw new NotImplementedException ();
263 public Object CreateInstance (String typeName, Boolean ignoreCase,
264 BindingFlags bindingAttr, Binder binder,
265 Object[] args, CultureInfo culture,
266 Object[] activationAttributes)
268 throw new NotImplementedException ();
271 public Module[] GetLoadedModules ()
273 throw new NotImplementedException ();
276 public Module[] GetModules ()
278 throw new NotImplementedException ();
281 public Module GetModule (String name)
283 throw new NotImplementedException ();
286 public String[] GetManifestResourceNames ()
288 throw new NotImplementedException ();
291 public static Assembly GetExecutingAssembly ()
293 throw new NotImplementedException ();
296 public AssemblyName[] GetReferencedAssemblies ()
298 throw new NotImplementedException ();
301 public ManifestResourceInfo GetManifestResourceInfo (String resourceName)
303 throw new NotImplementedException ();
306 public static Assembly Load (AssemblyName assemblyRef, Evidence assemblySecurity,
307 String callerLocation)
309 throw new NotImplementedException ();
312 public static Assembly Load (String assemblyString, Evidence assemblySecurity,
313 String callerLocation)
315 throw new NotImplementedException ();