Interface IGroupedObservable<TKey, T>
- Namespace
- RxSharp
- Assembly
- RxSharp.dll
An Observable<T>-shaped stream of values that all share a common Key. Mirrors
rxjs's GroupedObservable, the type emitted by groupBy. Declared as an interface (rather than a
subclass of Observable<T>, which is sealed) so it can still expose the same
two-overload Subscribe shape callers already get from Observable<T>.
public interface IGroupedObservable<TKey, T> : IObservable<T>
Type Parameters
TKeyThe type of the shared key.
TThe type of the grouped values.
Properties
Key
Gets the key shared by every value in this group.
TKey Key { get; }
Property Value
- TKey
Methods
Subscribe(Action<T>?, Action<Exception>?, Action?)
Subscribes to this group using plain delegates instead of a full IObserver<T>.
IDisposable Subscribe(Action<T>? onNext = null, Action<Exception>? onError = null, Action? onComplete = null)
Parameters
onNextAction<T>?Called for each value in the group.
onErrorAction<Exception>?Called if the group errors.
onCompleteAction?Called when the group closes.
Returns
- IDisposable
A disposable that unsubscribes from the group.