Ejemplo n.º 1
0
 public static Promise <T> Catch <T>(
     this Promise thisPromise,
     Func <Exception, T> postProcessRejected)
 {
     return(PromiseExtensions.Then <T>(thisPromise,
                                       null, postProcessRejected));
 }
Ejemplo n.º 2
0
        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));
        }