/// <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()))); }
/// <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)))); }
/// <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()))); }
/// <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)))); }