/// <summary> /// Complete the promise. Adds a defualt error handler. /// </summary> public void Done() { var resultPromise = new Promise(); resultPromise.WithName(Name); ActionHandlers(resultPromise, () => { }, ex => Promise.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 resultPromise = new Promise(); resultPromise.WithName(Name); ActionHandlers(resultPromise, onResolved, ex => Promise.PropagateUnhandledException(this, ex) ); }