/// <summary> /// Complete the promise. Adds a defualt error handler. /// </summary> public void Done() { var resultFpromise = new Fpromise(); resultFpromise.WithName(Name); ActionHandlers(resultFpromise, () => { }, ex => Fpromise.PropagateUnhandledException(this, ex) ); }
/// <summary> /// Completes the promise. /// onResolved is called on successful completion. /// Adds a default error handler. /// </summary> public void Done(Action onResolved) { // Argument.NotNull(() => onResolved); var resultFpromise = new Fpromise(); resultFpromise.WithName(Name); ActionHandlers(resultFpromise, onResolved, ex => Fpromise.PropagateUnhandledException(this, ex) ); }