<PackageReference Include="ReactiveUI.Disposables" Version="8.1.0" />

ReactiveUI.Primitives.Disposables.AssignmentSlot

public sealed class AssignmentSlot : IsDisposed, IDisposable
Primitives alias for a single-assignment disposable slot.
public bool IsDisposed { get; }

Gets a value indicating whether this instance is disposed.

public AssignmentSlot()

Initializes a new instance of the AssignmentSlot class.

public AssignmentSlot(Action action)

Initializes a new instance of the AssignmentSlot class.

public AssignmentSlot(IDisposable disposable)

Initializes a new instance of the AssignmentSlot class.

public AssignmentSlot(IDisposable disposable, Action action)

Initializes a new instance of the AssignmentSlot class.

public void Create(IDisposable disposable)

Assigns the disposable held by this slot.

public void Dispose()

Runs the constructor-supplied action, then disposes the assigned value and blocks further assignments; repeated calls have no further effect.