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 {
21 public class Assembly : System.Reflection.ICustomAttributeProvider,
22 System.Security.IEvidenceFactory, System.Runtime.Serialization.ISerializable {
23 private IntPtr _mono_assembly;
25 internal Assembly () {}
27 [MethodImplAttribute (MethodImplOptions.InternalCall)]
28 private extern string get_code_base ();
30 public virtual string CodeBase {
32 return get_code_base ();
36 public virtual string CopiedCodeBase {
42 public virtual string FullName {
45 // FIXME: This is wrong, but it gets us going
46 // in the compiler for now
52 public virtual MethodInfo EntryPoint {
58 public virtual Evidence Evidence {
64 public virtual String Location {
70 public virtual void GetObjectData (SerializationInfo info, StreamingContext context)
74 public virtual bool IsDefined (Type attributeType, bool inherit)
76 return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
79 public virtual object [] GetCustomAttributes (bool inherit)
81 return MonoCustomAttrs.GetCustomAttributes (this, inherit);
84 public virtual object [] GetCustomAttributes (Type attributeType, bool inherit)
86 return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
89 public virtual FileStream[] GetFiles ()
91 throw new NotImplementedException ();
94 public virtual FileStream GetFile (String name)
96 throw new NotImplementedException ();
99 public virtual Stream GetManifestResourceStream (String name)
101 throw new NotImplementedException ();
104 public virtual Stream GetManifestResourceStream (Type type, String name)
106 throw new NotImplementedException ();
109 [MethodImplAttribute (MethodImplOptions.InternalCall)]
110 public extern Type[] GetTypes (bool exportedOnly);
112 public virtual Type[] GetTypes ()
114 return GetTypes (false);
117 public virtual Type[] GetExportedTypes ()
119 return GetTypes (true);
122 public virtual Type GetType (String name, Boolean throwOnError)
124 return GetType (name, throwOnError, false);
127 public virtual Type GetType (String name) {
128 return GetType (name, false, false);
131 [MethodImplAttribute (MethodImplOptions.InternalCall)]
132 public extern Type GetType (String name, Boolean throwOnError, Boolean ignoreCase);
134 public virtual AssemblyName GetName (Boolean copiedName)
136 throw new NotImplementedException ();
139 public virtual AssemblyName GetName ()
141 throw new NotImplementedException ();
144 public override String ToString ()
146 return GetName ().Name;
150 public static String CreateQualifiedName (String assemblyName, String typeName)
152 return "FIXME: assembly";
156 public static String nCreateQualifiedName (String assemblyName, String typeName)
158 return "FIXME: assembly";
162 public static Assembly GetAssembly (Type type)
164 throw new NotImplementedException ();
168 public Assembly GetSatelliteAssembly (CultureInfo culture)
170 throw new NotImplementedException ();
173 public static Assembly LoadFrom (String assemblyFile)
175 return AppDomain.CurrentDomain.Load (assemblyFile);
178 public static Assembly Load (String assemblyString)
180 return AppDomain.CurrentDomain.Load (assemblyString);
183 public static Assembly Load (String assemblyString, Evidence assemblySecurity)
185 return AppDomain.CurrentDomain.Load (assemblyString, assemblySecurity);
188 public static Assembly Load (AssemblyName assemblyRef)
190 return AppDomain.CurrentDomain.Load (assemblyRef);
193 public static Assembly Load (AssemblyName assemblyRef, Evidence assemblySecurity)
195 return AppDomain.CurrentDomain.Load (assemblyRef, assemblySecurity);
198 public static Assembly Load (Byte[] rawAssembly)
200 return AppDomain.CurrentDomain.Load (rawAssembly);
203 public static Assembly Load (Byte[] rawAssembly, Byte[] rawSymbolStore)
205 return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore);
208 public static Assembly Load (Byte[] rawAssembly, Byte[] rawSymbolStore,
209 Evidence securityEvidence)
211 return AppDomain.CurrentDomain.Load (rawAssembly, rawSymbolStore, securityEvidence);
214 public static Assembly LoadWithPartialName (string partialName)
216 return LoadWithPartialName (partialName, null);
220 public static Assembly LoadWithPartialName (string partialName, Evidence securityEvidence)
222 return AppDomain.CurrentDomain.Load (partialName, securityEvidence);
226 public Object CreateInstance (String typeName)
228 throw new NotImplementedException ();
231 public Object CreateInstance (String typeName, Boolean ignoreCase)
233 throw new NotImplementedException ();
236 public Object CreateInstance (String typeName, Boolean ignoreCase,
237 BindingFlags bindingAttr, Binder binder,
238 Object[] args, CultureInfo culture,
239 Object[] activationAttributes)
241 throw new NotImplementedException ();
244 public Module[] GetLoadedModules ()
246 throw new NotImplementedException ();
249 public Module[] GetModules ()
251 throw new NotImplementedException ();
254 public Module GetModule (String name)
256 throw new NotImplementedException ();
259 public virtual String[] GetManifestResourceNames ()
261 throw new NotImplementedException ();
264 public static Assembly GetExecutingAssembly ()
266 throw new NotImplementedException ();
269 public AssemblyName[] GetReferencedAssemblies ()
271 throw new NotImplementedException ();
274 public virtual ManifestResourceInfo GetManifestResourceInfo (String resourceName)
276 throw new NotImplementedException ();