IObservable.cs 736 B

123456789101112131415161718192021222324
  1. // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
  2. #if NO_RXINTERFACES
  3. namespace System
  4. {
  5. /// <summary>
  6. /// Represents a push-style collection.
  7. /// </summary>
  8. #if !NO_VARIANCE
  9. public interface IObservable<out T>
  10. #else
  11. public interface IObservable<T>
  12. #endif
  13. {
  14. /// <summary>
  15. /// Subscribes an observer to the observable sequence.
  16. /// </summary>
  17. IDisposable Subscribe(IObserver<T> observer);
  18. }
  19. }
  20. #elif !WINDOWSPHONE7 // TypeForwardedTo is not presen on windows phone 7 so we can't really target
  21. [assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IObservable<>))]
  22. #endif