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

ReactiveUI.Primitives.Advanced.CreateSink<T>

public sealed class CreateSink<T> : IDisposable, IObserver<T>
Forwards notifications until termination and owns the resource returned by the subscription factory.
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 the sink has stopped.