Observers.cs 532 B

12345678910111213141516171819
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT License.
  3. // See the LICENSE file in the project root for more information.
  4. #nullable disable
  5. namespace System.Reactive
  6. {
  7. internal sealed class NopObserver<T> : IObserver<T>
  8. {
  9. public static readonly IObserver<T> Instance = new NopObserver<T>();
  10. public void OnCompleted() { }
  11. public void OnError(Exception error) { }
  12. public void OnNext(T value) { }
  13. }
  14. }