ISubject.Multi.cs 1.3 KB

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. namespace System.Reactive.Subjects
  5. {
  6. /// <summary>
  7. /// Represents an object that is both an observable sequence as well as an observer.
  8. /// </summary>
  9. /// <typeparam name="TSource">
  10. /// The type of the elements received by the subject.
  11. /// This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
  12. /// </typeparam>
  13. /// <typeparam name="TResult">
  14. /// The type of the elements produced by the subject.
  15. /// This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. For more information about covariance and contravariance, see Covariance and Contravariance in Generics.
  16. /// </typeparam>
  17. #if !NO_VARIANCE
  18. public interface ISubject<in TSource, out TResult> : IObserver<TSource>, IObservable<TResult>
  19. #else
  20. public interface ISubject<TSource, TResult> : IObserver<TSource>, IObservable<TResult>
  21. #endif
  22. {
  23. }
  24. }