5 // Jackson Harper (Jackson@LatitudeGeo.com)
7 // (C) 2003 Jackson Harper, All rights reserved
14 namespace Mono
.ILASM
{
17 /// Definition of a parameter passed to a method
19 public class ParamDef
{
21 private PEAPI
.ParamAttr attr
;
23 private ITypeRef typeref
;
24 private bool is_defined
;
25 private PEAPI
.Param peapi_param
;
27 public static readonly ParamDef Ellipsis
= new ParamDef (new PEAPI
.ParamAttr (), "ELLIPSIS", null);
29 public ParamDef (PEAPI
.ParamAttr attr
, string name
,
33 this.typeref
= typeref
;
37 public ITypeRef Type
{
38 get { return typeref; }
41 public string TypeName
{
42 get { return typeref.FullName; }
49 public PEAPI
.Param PeapiParam
{
50 get { return peapi_param; }
53 public bool IsSentinel ()
55 return (typeref
is SentinelTypeRef
&& this != Ellipsis
);
58 public void Define (CodeGen code_gen
)
63 typeref
.Resolve (code_gen
);
65 peapi_param
= new PEAPI
.Param (attr
,
66 name
, typeref
.PeapiType
);