Then.cs 871 B

12345678910111213141516171819202122232425
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the Apache 2.0 License.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Reactive.Joins;
  5. namespace System.Reactive.Linq
  6. {
  7. // REVIEW: Consider moving join patterns to a separate assembly.
  8. partial class AsyncObservable
  9. {
  10. // REVIEW: Consider adding async support.
  11. public static AsyncPlan<TResult> Then<TSource, TResult>(this IAsyncObservable<TSource> source, Func<TSource, TResult> selector)
  12. {
  13. if (source == null)
  14. throw new ArgumentNullException(nameof(source));
  15. if (selector == null)
  16. throw new ArgumentNullException(nameof(selector));
  17. return new AsyncPattern<TSource>(source).Then(selector);
  18. }
  19. }
  20. }