public static Promise <T> Catch <T>( this Promise thisPromise, Func <Exception, T> postProcessRejected) { return(PromiseExtensions.Then <T>(thisPromise, null, postProcessRejected)); }
public static Promise <T> CreatePromiseFromIAsyncResult <T>( Func <AsyncCallback, IAsyncResult> beginFunc, Func <IAsyncResult, T> endFunc) { var promise = new Promise <IAsyncResult>(); return(PromiseExtensions.Begin(promise, beginFunc).Then(endFunc)); }