In corlib/System.Runtime.InteropServices:
[mono.git] / mcs / ilasm / codegen / Sentinel.cs
1 //
2 // Mono.ILASM.SentinelTypeRef
3 //
4 // Author(s):
5 //  Jackson Harper (Jackson@LatitudeGeo.com)
6 //
7 // (C) 2003 Jackson Harper, All rights reserved
8 //
9
10 using System;
11 using System.Collections;
12
13 namespace Mono.ILASM {
14
15         public class SentinelTypeRef : BaseTypeRef {
16
17                 public SentinelTypeRef ()
18                         : this (null, null)
19                 {
20                 }
21
22                 public SentinelTypeRef (ArrayList conv_list, string sig_mod)
23                         : base ("...", conv_list, sig_mod)
24                 {
25                 }
26
27                 public override BaseTypeRef Clone ()
28                 {
29                         return new SentinelTypeRef ((ArrayList) ConversionList.Clone (), sig_mod);
30                 }
31
32                 public override void Resolve (CodeGen code_gen)
33                 {
34                         if (is_resolved)
35                                 return;
36
37                         type = new PEAPI.Sentinel ();
38                         type = Modify (code_gen, type);
39
40                         is_resolved = true;
41                 }
42
43                 protected override BaseMethodRef CreateMethodRef (BaseTypeRef ret_type, PEAPI.CallConv call_conv,
44                                 string name, BaseTypeRef[] param, int gen_param_count)
45                 {
46                         return new TypeSpecMethodRef (this, call_conv, ret_type, name, param, gen_param_count);
47                 }
48
49                 protected override IFieldRef CreateFieldRef (BaseTypeRef ret_type, string name)
50                 {
51                         return new TypeSpecFieldRef (this, ret_type, name);
52                 }
53
54                 public override string ToString ()
55                 {
56                         return "Sentinel  " + full_name;
57                 }
58         }
59
60 }
61