EnumBuilder.cs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. //
  2. // System.Reflection.Emit/EnumBuilder.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.Reflection.Emit;
  12. using System.Globalization;
  13. using System.Runtime.CompilerServices;
  14. namespace System.Reflection.Emit {
  15. public sealed class EnumBuilder : Type {
  16. CustomAttributeBuilder[] cattrs;
  17. public override Assembly Assembly {
  18. get {return null;}
  19. }
  20. public override string AssemblyQualifiedName {
  21. get {return null;}
  22. }
  23. public override Type BaseType {
  24. get {return null;}
  25. }
  26. public override Type DeclaringType {
  27. get {return null;}
  28. }
  29. public override string FullName {
  30. get {return null;}
  31. }
  32. public override Guid GUID {
  33. get {return Guid.Empty;}
  34. }
  35. public override Module Module {
  36. get {return null;}
  37. }
  38. public override string Name {
  39. get {return null;}
  40. }
  41. public override string Namespace {
  42. get {return null;}
  43. }
  44. public override Type ReflectedType {
  45. get {return null;}
  46. }
  47. public override RuntimeTypeHandle TypeHandle {
  48. get {return new RuntimeTypeHandle ();}
  49. }
  50. public TypeToken TypeToken {
  51. get {return new TypeToken ();}
  52. }
  53. public FieldBuilder UnderlyingField {
  54. get {return null;}
  55. }
  56. public override Type UnderlyingSystemType {
  57. get {return null;}
  58. }
  59. /* no need to override
  60. public override MemberTypes MemberType {
  61. get {return MemberTypes.TypeInfo;}
  62. }
  63. */
  64. internal EnumBuilder (ModuleBuilder mb, string name, TypeAttributes visibility, Type underlyingType) {
  65. }
  66. public Type CreateType() {
  67. return null;
  68. }
  69. public FieldBuilder DefineLiteral( string literalName, object literalValue) {
  70. return null;
  71. }
  72. protected override TypeAttributes GetAttributeFlagsImpl() {
  73. return (TypeAttributes)0;
  74. }
  75. protected override ConstructorInfo GetConstructorImpl( BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) {
  76. return null;
  77. }
  78. public override ConstructorInfo[] GetConstructors( BindingFlags bindingAttr) {
  79. return null;
  80. }
  81. public override object[] GetCustomAttributes(bool inherit) {
  82. return null;
  83. }
  84. public override object[] GetCustomAttributes(Type attributeType, bool inherit) {
  85. return null;
  86. }
  87. public override Type GetElementType() {
  88. throw new NotSupportedException ();
  89. }
  90. public override EventInfo GetEvent( string name, BindingFlags bindingAttr) {
  91. return null;
  92. }
  93. public override EventInfo[] GetEvents() {
  94. return null;
  95. }
  96. public override EventInfo[] GetEvents( BindingFlags bindingAttr) {
  97. return null;
  98. }
  99. public override FieldInfo GetField( string name, BindingFlags bindingAttr) {
  100. return null;
  101. }
  102. public override FieldInfo[] GetFields( BindingFlags bindingAttr) {
  103. return null;
  104. }
  105. public override Type GetInterface( string name, bool ignoreCase) {
  106. return null;
  107. }
  108. public override InterfaceMapping GetInterfaceMap( Type interfaceType) {
  109. throw new NotImplementedException ();
  110. }
  111. public override Type[] GetInterfaces() {
  112. return null;
  113. }
  114. public override MemberInfo[] GetMember( string name, MemberTypes type, BindingFlags bindingAttr) {
  115. return null;
  116. }
  117. public override MemberInfo[] GetMembers( BindingFlags bindingAttr) {
  118. return null;
  119. }
  120. protected override MethodInfo GetMethodImpl( string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) {
  121. // FIXME
  122. return null;
  123. }
  124. public override MethodInfo[] GetMethods( BindingFlags bindingAttr) {
  125. return null;
  126. }
  127. public override Type GetNestedType( string name, BindingFlags bindingAttr) {
  128. return null;
  129. }
  130. public override Type[] GetNestedTypes( BindingFlags bindingAttr) {
  131. return null;
  132. }
  133. public override PropertyInfo[] GetProperties( BindingFlags bindingAttr) {
  134. return null;
  135. }
  136. protected override PropertyInfo GetPropertyImpl( string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) {
  137. return null;
  138. }
  139. protected override bool HasElementTypeImpl() {
  140. throw new NotSupportedException ();
  141. }
  142. public override object InvokeMember( string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters) {
  143. return null;
  144. }
  145. protected override bool IsArrayImpl() {
  146. return false;
  147. }
  148. protected override bool IsByRefImpl() {
  149. return false;
  150. }
  151. protected override bool IsCOMObjectImpl() {
  152. return false;
  153. }
  154. protected override bool IsPointerImpl() {
  155. return false;
  156. }
  157. protected override bool IsPrimitiveImpl() {
  158. return false;
  159. }
  160. protected override bool IsValueTypeImpl() {
  161. return true;
  162. }
  163. public override bool IsDefined( Type attributeType, bool inherit) {
  164. return false;
  165. }
  166. public void SetCustomAttribute( CustomAttributeBuilder customBuilder) {
  167. if (cattrs != null) {
  168. CustomAttributeBuilder[] new_array = new CustomAttributeBuilder [cattrs.Length + 1];
  169. cattrs.CopyTo (new_array, 0);
  170. new_array [cattrs.Length] = customBuilder;
  171. cattrs = new_array;
  172. } else {
  173. cattrs = new CustomAttributeBuilder [1];
  174. cattrs [0] = customBuilder;
  175. }
  176. }
  177. public void SetCustomAttribute( ConstructorInfo con, byte[] binaryAttribute) {
  178. SetCustomAttribute (new CustomAttributeBuilder (con, binaryAttribute));
  179. }
  180. }
  181. }