2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
[mcs.git] / ilasm / codegen / Sentinel.cs
blobe94a3bad5b41b5998f6a61e7509cf634e3f5b4d1
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 //
10 using System;
11 using System.Collections;
13 namespace Mono.ILASM {
15 public class SentinelTypeRef : BaseTypeRef {
17 public SentinelTypeRef ()
18 : this (null, null)
22 public SentinelTypeRef (ArrayList conv_list, string sig_mod)
23 : base ("...", conv_list, sig_mod)
27 public override BaseTypeRef Clone ()
29 return new SentinelTypeRef ((ArrayList) ConversionList.Clone (), sig_mod);
32 public override void Resolve (CodeGen code_gen)
34 if (is_resolved)
35 return;
37 type = new PEAPI.Sentinel ();
38 type = Modify (code_gen, type);
40 is_resolved = true;
43 protected override BaseMethodRef CreateMethodRef (BaseTypeRef ret_type, PEAPI.CallConv call_conv,
44 string name, BaseTypeRef[] param, int gen_param_count)
46 return new TypeSpecMethodRef (this, call_conv, ret_type, name, param, gen_param_count);
49 protected override IFieldRef CreateFieldRef (BaseTypeRef ret_type, string name)
51 return new TypeSpecFieldRef (this, ret_type, name);
54 public override string ToString ()
56 return "Sentinel " + full_name;