private TimeSpan ExecuteStepMatch(BindingMatch match, object[] arguments) { TimeSpan duration = TimeSpan.Zero; try { match.StepBinding.Invoke(contextManager, testTracer, arguments, out duration); } catch (Exception ex) { if (stepErrorHandlers != null) { StepFailureEventArgs stepFailureEventArgs = new StepFailureEventArgs(match.StepBinding, match.StepArgs.StepContext, ex); foreach (var stepErrorHandler in stepErrorHandlers) { stepErrorHandler.OnStepFailure(this, stepFailureEventArgs); } if (stepFailureEventArgs.IsHandled) { return(duration); } } throw; } return(duration); }
private TimeSpan ExecuteStepMatch(BindingMatch match, object[] arguments) { TimeSpan duration = TimeSpan.Zero; try { match.StepBinding.Invoke(contextManager, testTracer, arguments, out duration); } catch(Exception ex) { if (stepErrorHandlers != null) { StepFailureEventArgs stepFailureEventArgs = new StepFailureEventArgs(match.StepBinding, match.StepArgs.StepContext, ex); foreach (var stepErrorHandler in stepErrorHandlers) { stepErrorHandler.OnStepFailure(this, stepFailureEventArgs); } if (stepFailureEventArgs.IsHandled) return duration; } throw; } return duration; }