Ejemplo n.º 1
0
 public static void Finally <T>(this TryUnit <T> tryUnit) where T : class
 {
     try
     {
         tryUnit.Action(tryUnit.Obj);
     }
     finally
     {
     }
 }
Ejemplo n.º 2
0
 public static CatchUnit <T> Catch <T>(this TryUnit <T> tryUnit, Action <Exception> exAction) where T : class
 {
     return(new CatchUnit <T>(tryUnit, exAction));
 }
Ejemplo n.º 3
0
 public CatchUnit(TryUnit <T> tryUnit, Action <Exception> exAction)
 {
     this.Obj      = tryUnit.Obj;
     this.Action   = tryUnit.Action;
     this.ExAction = exAction;
 }