ITestObservable.cs 1.0 KB

123456789101112131415161718192021222324252627
  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. using System;
  5. using System.Collections.Generic;
  6. using System.Reactive;
  7. namespace Microsoft.Reactive.Testing
  8. {
  9. /// <summary>
  10. /// Observable sequence that records subscription lifetimes and timestamped notification messages sent to observers.
  11. /// </summary>
  12. /// <typeparam name="T">The type of the elements in the sequence.</typeparam>
  13. public interface ITestableObservable<T> : IObservable<T>
  14. {
  15. /// <summary>
  16. /// Gets a list of all the subscriptions to the observable sequence, including their lifetimes.
  17. /// </summary>
  18. IList<Subscription> Subscriptions { get; }
  19. /// <summary>
  20. /// Gets the recorded timestamped notification messages that were sent by the observable sequence to its observers.
  21. /// </summary>
  22. IList<Recorded<Notification<T>>> Messages { get; }
  23. }
  24. }