2 // Mono.ILASM.CatchBlock
5 // Jackson Harper (Jackson@LatitudeGeo.com)
7 // (C) 2003 Jackson Harper, All rights reserved
14 namespace Mono
.ILASM
{
16 public class CatchBlock
: ISehClause
{
18 private BaseTypeRef type_ref
;
19 private HandlerBlock handler_block
;
21 public CatchBlock (BaseTypeRef type_ref
)
23 this.type_ref
= type_ref
;
26 public void SetHandlerBlock (HandlerBlock hb
)
31 public PEAPI
.HandlerBlock
Resolve (CodeGen code_gen
, MethodDef method
)
33 PEAPI
.CILLabel
from = handler_block
.GetFromLabel (code_gen
, method
);
34 PEAPI
.CILLabel to
= handler_block
.GetToLabel (code_gen
, method
);
37 type_ref
.Resolve (code_gen
);
39 katch
= new PEAPI
.Catch (type_ref
.PeapiType
, from, to
);