Assembly.cs 6.5 KB

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