<PackageReference Include="ReactiveUI.Primitives.Core" Version="8.1.0" />

ReactiveUI.Primitives.Advanced.GroupByWitness<TSource, TKey, TElement>

public sealed class GroupByWitness<TSource, TKey, TElement> : IObserver<TSource>, IDisposable
Sink that routes each source value to the group of its key, opening a group the first time a key appears.

Gets the subscription handed to the outer subscriber; the source stays subscribed while any group is.

public GroupByWitness(IObserver<GroupedSignal<TKey, TElement>> observer, Func<TSource, TKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TKey> comparer, int capacity)

Initializes a new instance of the GroupByWitness<T, U, V> class.

public void Dispose()

public void OnCompleted()

public void OnError(Exception error)

public void OnNext(TSource value)

public void SetSubscription(IDisposable subscription)

Assigns the upstream subscription, disposing the incoming one when this sink holds a subscription or has been disposed.