|
Enhanced C#
Loyc library documentation
|
Returned by Set; restores the previous ambient override (if any) when disposed. More...
Returned by Set; restores the previous ambient override (if any) when disposed.
Public fields | |
| AmbientService< T > | _owner |
| T | _oldValue |
Public fields inherited from Loyc.Threading.AmbientService< T > | |
| T | Value => _overrideCount == 0 ? _globalDefault : _override.Value ?? _globalDefault |
| Gets the current T instance (the current async execution context's override if one is active, otherwise GlobalDefault. More... | |
Public Member Functions | |
| void | Dispose () |
Public Member Functions inherited from Loyc.Threading.AmbientService< T > | |
| AmbientService (T globalDefault) | |
| Saved | Set (T newValue) |
Installs an ambient (async-local) override. Designed to be used in a using statement, which restores the old value at the end. More... | |
Additional Inherited Members | |
Properties inherited from Loyc.Threading.AmbientService< T > | |
| T | GlobalDefault [get, set] |
| The instance used by every execution context that has no ambient override from Set. It can be replaced app-wide. More... | |
1.8.7