2 using System.Reflection;
3 using System.Reflection.Emit;
4 using System.Globalization;
5 using System.Runtime.CompilerServices;
7 namespace System.Reflection.Emit {
8 public sealed class MethodBuilder : MethodInfo {
11 private Type[] paremeters;
12 private MethodAttributes attrs;
14 private RuntimeMethodHandle mhandle;
16 public override Type ReturnType {get {return rtype;}}
17 public override Type ReflectedType {get {return null;}}
18 public override Type DeclaringType {get {return null;}}
19 public override string Name {get {return name;}}
20 public override RuntimeMethodHandle MethodHandle {get {return mhandle;}}
21 public override MethodAttributes Attributes {get {return attrs;}}
22 public override ICustomAttributeProvider ReturnTypeCustomAttributes {
27 public override MethodInfo GetBaseDefinition() {
30 public override MethodImplAttributes GetMethodImplementationFlags() {
31 return (MethodImplAttributes)0;
33 public override ParameterInfo[] GetParameters() {
38 * FIXME: this method signature needs to be expanded to handle also
41 [MethodImplAttribute(MethodImplOptions.InternalCall)]
42 private static extern void set_method_body (MethodBuilder method, byte[] il, int count);
44 public void CreateMethodBody( byte[] il, int count) {
45 set_method_body (this, il, count);
47 public override Object Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) {
50 public override bool IsDefined (Type attribute_type, bool inherit) {
53 public override object[] GetCustomAttributes( bool inherit) {
56 public override object[] GetCustomAttributes( Type attributeType, bool inherit) {