1
0

Never.cs 619 B

12345678910111213141516171819202122
  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. #if !NO_PERF
  5. using System;
  6. using System.Reactive.Disposables;
  7. namespace System.Reactive.Linq.ObservableImpl
  8. {
  9. class Never<TResult> : IObservable<TResult>
  10. {
  11. public IDisposable Subscribe(IObserver<TResult> observer)
  12. {
  13. if (observer == null)
  14. throw new ArgumentNullException(nameof(observer));
  15. return Disposable.Empty;
  16. }
  17. }
  18. }
  19. #endif