示例#1
0
文件: Promise.cs 项目: paunaal/Utils
    public static IPromise All(List <IPromise> promises)
    {
        Promise promise = new Promise();

        promise.Resolve();
        IPromise p2 = promise;

        foreach (IPromise p in promises)
        {
            p2 = p2.Pipe(() => { return(p); });
        }


        return(p2);
    }