<PackageReference Include="ReactiveUI.Primitives" Version="7.3.0" />

ReactiveUI.Primitives.Advanced.CreateSink<T>

public sealed class CreateSink<T> : IDisposable, IObserver<T>
The observer handed to create-style subscription factories: forwards until terminated, owns the factory's cancel resource, and optionally releases it when a downstream OnNext throws (the safe-create contract). The shared sink behind CreateSignal<T> and CreateSafeSignal<T>, usable by any implementation that hands an observer to a caller-supplied subscribe delegate.
public CreateSink(IObserver<T> observer, bool disposeOnNextThrow)

Initializes a new instance of the CreateSink<T> class.

public CreateSink(IObserver<T> observer, IDisposable cancel, bool disposeOnNextThrow)

Initializes a new instance of the CreateSink<T> class with an eager cancel resource.

public void Dispose()

public void OnCompleted()

public void OnError(Exception error)

public void OnNext(T value)

public void SetCancel(IDisposable cancel)

Assigns the cancellation resource, releasing it immediately when already stopped.