protected override void UnPopulate() { base.UnPopulate(); if (_archive != null) { _archive.Dispose(); _archive = null; } }
protected override void Populate() { try { _cancelPopulateTask.Token.ThrowIfCancellationRequested(); _archive = new BblArchive(this); if (_pages == null) { ObservableCollection <BblPage> pages = _archive.GetPagesList(); _cancelPopulateTask.Token.ThrowIfCancellationRequested(); if (pages.Count <= 0) { return; } lock (_lock) { _pages = pages; } } } catch { UnPopulate(); } }