With BehaviorSubject<T>guaranteed you get a * value Firstthat is always available.
However, query operators IObservable<T>cannot work on this assumption as a whole, so an attribute Obsoletewas added to encourage people to use asynchronous methods, such as FirstAsync- helping them to "get into the pit of success."
- BehaviorSubject<T>, , safe Value. , , - :
var subject = new BehaviorSubject<string>("Some value");
:
var current = subject.Value;
* BehaviorSubject<T> , Dispose, Value , FirstAsync, ObjectDisposedException.