Table of Contents

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

TKey

The type of the shared key.

T

The type of the grouped values.

Inheritance
System.Object
GroupedObservable<TKey, T>
Implements
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

observer IObserver<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

onNext Action<T>?

Called for each value in the group.

onError Action<Exception>?

Called if the group errors.

onComplete Action?

Called when the group closes.

Returns

IDisposable

A disposable that unsubscribes from the group.