コード例 #1
0
ファイル: Fpromise.cs プロジェクト: interess/GGJ2018
 /// <summary>
 /// Takes a function that yields an enumerable of promises.
 /// Converts to a value promise.
 /// Returns a promise that resolves when the first of the promises has resolved.
 /// </summary>
 public IFpromise <ConvertedT> ThenRace <ConvertedT>(Func <IEnumerable <IFpromise <ConvertedT> > > chain)
 {
     return(Then(() => Fpromise <ConvertedT> .Race(chain())));
 }
コード例 #2
0
 /// <summary>
 /// Takes a function that yields an enumerable of promises.
 /// Converts to a non-value promise.
 /// Returns a promise that resolves when the first of the promises has resolved.
 /// Yields the value from the first promise that has resolved.
 /// </summary>
 public IFpromise ThenRace(Func <FpromisedT, IEnumerable <IFpromise> > chain)
 {
     return(Then(value => Fpromise.Race(chain(value))));
 }
コード例 #3
0
ファイル: Fpromise.cs プロジェクト: interess/GGJ2018
 /// <summary>
 /// Takes a function that yields an enumerable of promises.
 /// Returns a promise that resolves when the first of the promises has resolved.
 /// </summary>
 public IFpromise ThenRace(Func <IEnumerable <IFpromise> > chain)
 {
     return(Then(() => Fpromise.Race(chain())));
 }
コード例 #4
0
 /// <summary>
 /// Takes a function that yields an enumerable of promises.
 /// Returns a promise that resolves when the first of the promises has resolved.
 /// Yields the value from the first promise that has resolved.
 /// </summary>
 public IFpromise <ConvertedT> ThenRace <ConvertedT>(Func <FpromisedT, IEnumerable <IFpromise <ConvertedT> > > chain)
 {
     return(Then(value => Fpromise <ConvertedT> .Race(chain(value))));
 }