Updates and fixes.
[mono.git] / mcs / class / corlib / System.Reflection.Emit / MethodBuilder.cs
1 using System;
2 using System.Reflection;
3 using System.Reflection.Emit;
4 using System.Globalization;
5 using System.Runtime.CompilerServices;
6
7 namespace System.Reflection.Emit {
8         public sealed class MethodBuilder : MethodInfo {
9                 private IntPtr _impl;
10                 private Type rtype;
11                 private Type[] paremeters;
12                 private MethodAttributes attrs;
13                 private string name;
14                 private RuntimeMethodHandle mhandle;
15                 
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 {
23                         get {return null;}
24                 }
25
26                 
27                 public override MethodInfo GetBaseDefinition() {
28                         return null;
29                 }
30                 public override MethodImplAttributes GetMethodImplementationFlags() {
31                         return (MethodImplAttributes)0;
32                 }
33                 public override ParameterInfo[] GetParameters() {
34                         return null;
35                 }
36                 
37                 /*
38                  * FIXME: this method signature needs to be expanded to handle also
39                  * a ILGenerator.
40                  */
41                 [MethodImplAttribute(MethodImplOptions.InternalCall)]
42                 private static extern void set_method_body (MethodBuilder method, byte[] il, int count);
43                 
44                 public void CreateMethodBody( byte[] il, int count) {
45                         set_method_body (this, il, count);
46                 }
47                 public override Object Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) {
48                         return null;
49                 }
50                 public override bool IsDefined (Type attribute_type, bool inherit) {
51                         return false;
52                 }
53                 public override object[] GetCustomAttributes( bool inherit) {
54                         return null;
55                 }
56                 public override object[] GetCustomAttributes( Type attributeType, bool inherit) {
57                         return null;
58                 }
59
60
61
62
63         }
64 }
65