/// <summary> /// Releases unmanaged and - optionally - managed resources. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected virtual void Dispose(bool disposing) { if (disposing) { ModalSubject?.Dispose(); PageSubject?.Dispose(); } }
/// <summary> /// Returns the top modal from the current modal stack. /// </summary> /// <returns>An observable that signals the top modal view model.</returns> public IObservable <IViewModel> TopModal() => ModalSubject.FirstAsync().Select(x => x[x.Count - 1]);