You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug ObservableAsPropertyHelper.Value throws an ArgumentNullException if the subscription was deferred and the object has been disposed (perhaps on another thread). This behavior is unexpected and confusing as to the real source of the problem - namely that the OAPH has been disposed.
Steps To Reproduce
Create an OAPH
Dispose the OAPH
Access Value property of the OAPH
Throws ArgumentNullException
See also the unit test in the Pull Request.
Expected behavior
Either:
No error thrown and the last value is maintained
Throw ObjectDisposedException
Not throwing any exception is preferred to ease multi-threading access by reducing the need for thread synchronization.
Screenshots
N/A
Environment
OS: Windows
Version 11.4.17
Device: PC
Additional context
N/A
The text was updated successfully, but these errors were encountered:
(#2456)
* fix: avoid throwing ArgumentNullException from OAPH.Value (#2455)
Ensure OAPH CompositeDisposable is not null before subscribing
Add unit test to cover case where OAPH has been disposed
* docs: remove duplicate words in OAPH documentation
Co-authored-by: John Cummings <john.cummings@quantitech.com>
Describe the bug
ObservableAsPropertyHelper.Value
throws anArgumentNullException
if the subscription was deferred and the object has been disposed (perhaps on another thread). This behavior is unexpected and confusing as to the real source of the problem - namely that the OAPH has been disposed.Steps To Reproduce
Value
property of the OAPHArgumentNullException
See also the unit test in the Pull Request.
Expected behavior
Either:
ObjectDisposedException
Not throwing any exception is preferred to ease multi-threading access by reducing the need for thread synchronization.
Screenshots
N/A
Environment
Additional context
N/A
The text was updated successfully, but these errors were encountered: