Module.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. //
  2. // System.Reflection/Module.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.Reflection;
  11. using System.Runtime.Serialization;
  12. using System.Security.Cryptography.X509Certificates;
  13. using System.Runtime.InteropServices;
  14. namespace System.Reflection {
  15. [Serializable]
  16. public class Module : ISerializable, ICustomAttributeProvider {
  17. public static readonly TypeFilter FilterTypeName;
  18. public static readonly TypeFilter FilterTypeNameIgnoreCase;
  19. private IntPtr _impl; /* a pointer to a MonoImage */
  20. internal Assembly assembly;
  21. internal string fqname;
  22. internal string name;
  23. internal string scopename;
  24. internal bool is_resource;
  25. internal Module () {}
  26. public Assembly Assembly {
  27. get { return assembly; }
  28. }
  29. public virtual string FullyQualifiedName {
  30. get { return fqname; }
  31. }
  32. public string Name {
  33. get { return name; }
  34. }
  35. public string ScopeName {
  36. get { return scopename; }
  37. }
  38. [MonoTODO]
  39. public virtual Type[] FindTypes(TypeFilter filter, object filterCriteria)
  40. {
  41. return null;
  42. }
  43. [MonoTODO]
  44. public virtual object[] GetCustomAttributes(bool inherit)
  45. {
  46. return MonoCustomAttrs.GetCustomAttributes (this, inherit);
  47. }
  48. [MonoTODO]
  49. public virtual object[] GetCustomAttributes(Type attributeType, bool inherit)
  50. {
  51. return MonoCustomAttrs.GetCustomAttributes (this, attributeType, inherit);
  52. }
  53. [MonoTODO]
  54. public FieldInfo GetField (string name)
  55. {
  56. return null;
  57. }
  58. [MonoTODO]
  59. public FieldInfo GetField (string name, BindingFlags flags)
  60. {
  61. return null;
  62. }
  63. [MonoTODO]
  64. public FieldInfo[] GetFields ()
  65. {
  66. return null;
  67. }
  68. [MonoTODO]
  69. public MethodInfo GetMethod (string name)
  70. {
  71. return null;
  72. }
  73. [MonoTODO]
  74. public MethodInfo GetMethod (string name, Type[] types)
  75. {
  76. return null;
  77. }
  78. [MonoTODO]
  79. public MethodInfo GetMethod (string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
  80. {
  81. return null;
  82. }
  83. [MonoTODO]
  84. protected virtual MethodInfo GetMethodImpl (string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
  85. {
  86. return null;
  87. }
  88. [MonoTODO]
  89. public MethodInfo[] GetMethods ()
  90. {
  91. return null;
  92. }
  93. [MonoTODO]
  94. public virtual void GetObjectData (SerializationInfo info, StreamingContext context)
  95. {
  96. }
  97. public X509Certificate GetSignerCertificate ()
  98. {
  99. try {
  100. return X509Certificate.CreateFromSignedFile (assembly.Location);
  101. }
  102. catch {
  103. return null;
  104. }
  105. }
  106. [MonoTODO]
  107. public virtual Type GetType(string className)
  108. {
  109. return null;
  110. }
  111. [MonoTODO]
  112. public virtual Type GetType(string className, bool ignoreCase)
  113. {
  114. return null;
  115. }
  116. [MonoTODO]
  117. public virtual Type GetType(string className, bool throwOnError, bool ignoreCase)
  118. {
  119. return null;
  120. }
  121. [MonoTODO]
  122. public virtual Type[] GetTypes()
  123. {
  124. return null;
  125. }
  126. [MonoTODO]
  127. public virtual bool IsDefined (Type attributeType, bool inherit)
  128. {
  129. return MonoCustomAttrs.IsDefined (this, attributeType, inherit);
  130. }
  131. public bool IsResource()
  132. {
  133. return is_resource;
  134. }
  135. [MonoTODO]
  136. public override string ToString ()
  137. {
  138. return "Reflection.Module: " + name;
  139. }
  140. }
  141. }