Merge pull request #4246 from Unity-Technologies/mcs-generic-constraint-enumerator
[mono.git] / mcs / ilasm / codegen / FinallyBlock.cs
1 //
2 // Mono.ILASM.FinallyBlock
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 FinallyBlock : ISehClause {
16
17                 private HandlerBlock handler_block;
18
19                 public FinallyBlock ()
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.Finally phinally = new PEAPI.Finally (from, to);
34
35                         return phinally;
36                 }
37         }
38
39 }
40
41