Flush and clear all of the Disposers and IDisposables in the Map.
Flush and clear all of the Disposers and IDisposables in the Map.
Invoke the DisposableType and remove it from the Map at the specific key.
Optionalkey:
TKey
Map key of the DisposableType. Flush all if omitted.
Check if a DisposableType at the specific key is in the Map.
Map key of the DisposableType.
true if exists, otherwise false.
Returns an iterable of keys in the map
Invoke the executor function and add the returned DisposableType to the Map at the specific key.
Adding DisposableType to
the same key will first invoke(flush) the previous
DisposableType at that
key.
Key for the
DisposableType.
Adding with same key will first invoke(flush) the previous
DisposableType.
A function that returns a DisposableType.
The returned DisposableType.
Invoke the executor function and add the returned DisposableType to the Map at the specific key.
Do nothing if null | undefined is returned or the returned
DisposableType is already
in the Map.
Adding DisposableType to
the same key will first invoke(flush) the previous
DisposableType at that
key.
Key for the
DisposableType.
Adding with same key will first invoke(flush) the previous
DisposableType.
A function that returns either a
DisposableType or
null | undefined.
The returned
DisposableType, or
undefined if the executor returns null | undefined.
Remove the DisposableType at the specific key from the Map. Does not invoke the removed DisposableType.
Map key of the DisposableType.
The removed
DisposableType if exists,
undefined if the
DisposableType is not
found.
Set a DisposableType to the Map at the specific key.
Adding DisposableType to
the same key will first invoke(flush) the previous
DisposableType at that
key.
Key for the
DisposableType.
Adding with same key will first invoke(flush) the previous
DisposableType.
A DisposableType .
The same DisposableType .
Get the number of DisposableTypes in the Map.
A Disposable Map is an IDisposable store that manages Disposers and IDisposables with keys.
All Disposers and IDisposables in the Map will be invoked(
flush) when the Map is disposed.A DisposableMap is also a Disposer, which means it can be the
disposemethod of an IDisposable.A DisposableMap is also an IDisposable, which means it can be managed by another DisposableMap.