// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. using System.Collections.Generic; namespace System.Reactive.Linq { /// /// Represents a sorted observable sequence. /// /// /// The type of the data in the data source. /// 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. /// #if !NO_VARIANCE public interface IOrderedObservable : IObservable #else public interface IOrderedObservable : IObservable #endif { /// /// Performs a subsequent ordering on the elements of an according to a key. /// /// The type of the key produced by . /// The function used to extract the key for each element. /// The used to compare keys for placement in the returned sequence. /// to sort the elements in descending order; to sort the elements in ascending order. /// An whose elements are sorted according to a key. IOrderedObservable CreateOrderedObservable(Func keySelector, IComparer comparer, bool descending); /// /// Performs a subsequent ordering on the elements of an according to other observable sequences. /// /// The type of the elements in the observable returned by . /// A function that returns an observable for an element indicating the time at which that element should appear in the ordering. /// to sort the elements in descending order; to sort the elements in ascending order. /// An whose elements are sorted according to the times at which corresponding observable sequences produce their first notification or complete. IOrderedObservable CreateOrderedObservable(Func> timeSelector, bool descending); } }