ITestObservable.cs 992 B

12345678910111213141516171819202122232425
  1. // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Reactive;
  5. namespace Microsoft.Reactive.Testing
  6. {
  7. /// <summary>
  8. /// Observable sequence that records subscription lifetimes and timestamped notification messages sent to observers.
  9. /// </summary>
  10. /// <typeparam name="T">The type of the elements in the sequence.</typeparam>
  11. public interface ITestableObservable<T> : IObservable<T>
  12. {
  13. /// <summary>
  14. /// Gets a list of all the subscriptions to the observable sequence, including their lifetimes.
  15. /// </summary>
  16. IList<Subscription> Subscriptions { get; }
  17. /// <summary>
  18. /// Gets the recorded timestamped notification messages that were sent by the observable sequence to its observers.
  19. /// </summary>
  20. IList<Recorded<Notification<T>>> Messages { get; }
  21. }
  22. }