Flush and remove the current Disposer and IDisposable.
Optionalcurrent
The current DisposableType.
Invoke the current DisposableType and remove it.
Check if the DisposableType is the current one.
The DisposableType.
true
if the DisposableType is
the current one, otherwise false.
Invoke the executor function and set the returned DisposableType.
Do nothing if the DisposableType already exists.
A function that returns a DisposableType.
The returned DisposableType.
Invoke the executor function and set the returned DisposableType.
Do nothing if null | undefined is returned or the returned
DisposableType already
exists.
A function that returns either a
DisposableType or
undefined | null.
The returned
DisposableType, or
undefined if the executor returns undefined | null.
Invoke the executor function and set the returned
DisposableType. Do
nothing if undefined | null is returned.
Do nothing if the DisposableType already exists.
A function that returns either a
DisposableType or
undefined | null.
The DisposableType, or
undefined if the executor returns undefined | null.
Remove the current DisposableType. Does not invoke the removed DisposableType.
true
if a DisposableType exists
and removed, otherwise false.
Set a DisposableType.
Do nothing if the same DisposableType already exists.
Existing DisposableType will be flushed before setting a new one.
A DisposableType .
The same DisposableType .
Set a DisposableType.
Do nothing if the same DisposableType already exists.
Existing DisposableType will be flushed before setting a new one.
Optionaldisposable:
T
A DisposableType .
The same DisposableType .
DisposableOne is an IDisposable that manages a single Disposer or IDisposable.
The current Disposer and IDisposable in DisposableOne will be invoked(
flush) when setting a new one.A DisposableOne is also a Disposer, which means it can be the
disposemethod of an IDisposable.