* GlobalMethodRef.cs: New file - A reference to a global method
[mono.git] / mcs / ilasm / codegen / GlobalMethodRef.cs
1 //
2 // Mono.ILASM.GlobalMethodRef
3 //
4 // Author(s):
5 //  Jackson Harper (Jackson@LatitudeGeo.com)
6 //
7 // (C) 2003 Jackson Harper, All rights reserved
8 //
9
10
11 using System;
12 using System.Collections;
13
14 namespace Mono.ILASM {
15
16         public class GlobalMethodRef : IMethodRef {
17
18                 private ITypeRef ret_type;
19                 private string name;
20                 private ITypeRef[] param;
21
22                 private PEAPI.Method peapi_method;
23
24                 public GlobalMethodRef (ITypeRef ret_type, string name, ITypeRef[] param)
25                 {
26                         this.ret_type = ret_type;
27                         this.name = name;
28                         this.param = param;
29                 }
30
31                 public PEAPI.Method PeapiMethod {
32                         get { return peapi_method; }
33                 }
34
35                 public void Resolve (CodeGen code_gen)
36                 {
37                         string sig = MethodDef.CreateSignature (name, new ArrayList (param));
38                         peapi_method = code_gen.ResolveMethod (sig);
39                 }
40
41         }
42
43 }
44