/// <summary> /// If exit status is not continuable returns <c>true</c>, otherwise /// delegates to #IsComplete(IRepeatContext). /// </summary> /// <param name="context"></param> /// <param name="result"></param> /// <returns></returns> public virtual bool IsComplete(IRepeatContext context, RepeatStatus result) { if (result != null && !result.IsContinuable()) { return(true); } return(IsComplete(context)); }
/// <summary> /// If exit status is not continuable returns <code>true</code>, otherwise /// delegates to #IsComplete(IRepeatContext). /// </summary> /// <param name="context"></param> /// <param name="result"></param> /// <returns></returns> public virtual bool IsComplete(IRepeatContext context, RepeatStatus result) { if (result != null && !result.IsContinuable()) { return true; } return IsComplete(context); }
/// <summary> /// Convenience method to execute after interceptors on a callback result. /// </summary> /// <param name="context"></param> /// <param name="value"></param> protected void ExecuteAfterInterceptors(IRepeatContext context, RepeatStatus value) { // Don't re-throw exceptions here: let the exception handler deal with // that... if (value != null && value.IsContinuable()) { for (int i = _listeners.Length; i-- > 0;) { IRepeatListener interceptor = _listeners[i]; interceptor.After(context, value); } } }
/// <summary> /// True if the result is null, or a RepeatStatus indicating completion. /// </summary> /// <param name="context"></param> /// <param name="result"></param> /// <returns></returns> public override bool IsComplete(IRepeatContext context, RepeatStatus result) { return (result == null || !result.IsContinuable()); }
/// <summary> /// True if the result is null, or a RepeatStatus indicating completion. /// </summary> /// <param name="context"></param> /// <param name="result"></param> /// <returns></returns> public override bool IsComplete(IRepeatContext context, RepeatStatus result) { return(result == null || !result.IsContinuable()); }
/// <summary> /// Check return value from batch operation. /// </summary> /// <param name="value"></param> /// <returns></returns> protected bool CanContinue(RepeatStatus value) { return(value.IsContinuable()); }
/// <summary> /// Convenience method to execute after interceptors on a callback result. /// </summary> /// <param name="context"></param> /// <param name="value"></param> protected void ExecuteAfterInterceptors(IRepeatContext context, RepeatStatus value) { // Don't re-throw exceptions here: let the exception handler deal with // that... if (value != null && value.IsContinuable()) { for (int i = _listeners.Length; i-- > 0; ) { IRepeatListener interceptor = _listeners[i]; interceptor.After(context, value); } } }
/// <summary> /// Check return value from batch operation. /// </summary> /// <param name="value"></param> /// <returns></returns> protected bool CanContinue(RepeatStatus value) { return value.IsContinuable(); }