Class GroupedObservable<TKey, T>
- Namespace
- RxSharp
- Assembly
- RxSharp.dll
Concrete IGroupedObservable<TKey, T> used by GroupBy. Backed by a Subject<T>
so it multicasts to every subscriber (matching rxjs's own GroupedObservable, which is itself a thin
wrapper around a per-group Subject).
public sealed class GroupedObservable<TKey, T> : IGroupedObservable<TKey, T>, IObservable<T>
Type Parameters
TKeyThe type of the shared key.
TThe type of the grouped values.
- Inheritance
-
System.ObjectGroupedObservable<TKey, T>
- Implements
-
IGroupedObservable<TKey, T>IObservable<T>
Properties
Key
Gets the key shared by every value in this group.
public TKey Key { get; }
Property Value
- TKey
Methods
Subscribe(IObserver<T>)
public IDisposable Subscribe(IObserver<T> observer)
Parameters
observerIObserver<T>
Returns
- IDisposable
Subscribe(Action<T>?, Action<Exception>?, Action?)
Subscribes to this group using plain delegates instead of a full IObserver<T>.
public 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.