Пример #1
0
 public void Execute(CaseExecution caseExecution, object instance)
 {
     try
     {
         outer(caseExecution, instance, () => inner.Execute(caseExecution, instance));
     }
     catch (Exception exception)
     {
         caseExecution.Fail(exception);
     }
 }
Пример #2
0
 public void Execute(Case @case, object instance)
 {
     try
     {
         outer(@case, instance, () => inner.Execute(@case, instance));
     }
     catch (PreservedException preservedException)
     {
         @case.Exceptions.Add(preservedException.OriginalException);
     }
     catch (Exception exception)
     {
         @case.Exceptions.Add(exception);
     }
 }