3 // System.Reflection.Emit/MethodBuilder.cs
6 // Paolo Molaro (lupus@ximian.com)
8 // (C) 2001 Ximian, Inc. http://www.ximian.com
12 using System.Reflection;
13 using System.Reflection.Emit;
14 using System.Globalization;
15 using System.Runtime.CompilerServices;
17 namespace System.Reflection.Emit {
18 public sealed class MethodBuilder : MethodInfo {
21 private Type[] paremeters;
22 private MethodAttributes attrs;
24 private RuntimeMethodHandle mhandle;
26 public override Type ReturnType {get {return rtype;}}
27 public override Type ReflectedType {get {return null;}}
28 public override Type DeclaringType {get {return null;}}
29 public override string Name {get {return name;}}
30 public override RuntimeMethodHandle MethodHandle {get {return mhandle;}}
31 public override MethodAttributes Attributes {get {return attrs;}}
32 public override ICustomAttributeProvider ReturnTypeCustomAttributes {
37 public override MethodInfo GetBaseDefinition() {
40 public override MethodImplAttributes GetMethodImplementationFlags() {
41 return (MethodImplAttributes)0;
43 public override ParameterInfo[] GetParameters() {
48 * FIXME: this method signature needs to be expanded to handle also
51 [MethodImplAttribute(MethodImplOptions.InternalCall)]
52 private static extern void set_method_body (MethodBuilder method, byte[] il, int count);
54 public void CreateMethodBody( byte[] il, int count) {
55 set_method_body (this, il, count);
57 public override Object Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) {
60 public override bool IsDefined (Type attribute_type, bool inherit) {
63 public override object[] GetCustomAttributes( bool inherit) {
66 public override object[] GetCustomAttributes( Type attributeType, bool inherit) {