internal void OnError(Exception error) { lock (_updateLock) { _latestWait?.OnError(error); } }
void TryResolveGet() { if (HasError) { _pendingGet.OnError(new Exception(_query.Context.ErrorMessage)); } else if (IsDone) { _pendingGet.OnError(new Exception($"Expected to get {_key} but it is done")); } else { if (IsLatest) { _pendingGet.OnOccurred(); } } }
void TryResolveDone() { if (HasError) { _pendingDone.OnError(new Exception(_query.Context.ErrorMessage)); } else { if (IsLatest && IsDone) { _pendingDone.OnOccurred(); } } }