Skip to content

Applies to

net10.0, netstandard2.0

public static IObservable<IChangeSet<T>> RefCount<T>(this IObservable<IChangeSet<T>> source) where T : notnull

View source

Summary: Reference-counted materialization of the source changeset stream into an IObservableList. The shared list is created on the first subscriber and disposed when the last subscriber unsubscribes.

Type parameters

NameDescription
TThe type of the item.

Parameters

NameTypeDescription
sourceIObservable>The source IObservable&lt;IChangeSet&lt;T&gt;&gt; to share via reference counting.

Returns: IObservable> -- A list changeset stream backed by a shared, reference-counted IObservableList.

Remarks

Equivalent to Publish().RefCount() for changeset streams. The underlying list is created lazily on first subscription.

Exceptions

TypeCondition
System.ArgumentNullExceptionsource is null.

See also