New test.
[mono.git] / mcs / ilasm / codegen / FaultBlock.cs
1 //
2 // Mono.ILASM.FaultBlock
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
13 namespace Mono.ILASM {
14
15         public class FaultBlock : ISehClause {
16
17                 private HandlerBlock handler_block;
18
19                 public FaultBlock ()
20                 {
21
22                 }
23
24                 public void SetHandlerBlock (HandlerBlock hb)
25                 {
26                         handler_block = hb;
27                 }
28
29                 public PEAPI.HandlerBlock Resolve (CodeGen code_gen, MethodDef method)
30                 {
31                         PEAPI.CILLabel from = handler_block.GetFromLabel (code_gen, method);
32                         PEAPI.CILLabel to = handler_block.GetToLabel (code_gen, method);
33                         PEAPI.Fault fault = new PEAPI.Fault (from, to);
34
35                         return fault;
36                 }
37         }
38
39 }
40
41