protected override void OnViewLoaded(object view)
        {
            base.OnViewLoaded(view);

            if (CatalogId <= 0)
            {
                throw new ArgumentException("CatalogId is not set in CatalogPageViewModel.");
            }

            _catalog = CatalogRepository.Get(CatalogId);
            if (_catalog == null)
            {
                return;
            }

            _catalogAuthorizationService = _catalogAuthorizationFactory.GetAuthorizationService(_catalog);
            NotifyOfPropertyChange("IsAuthorized");

            CatalogReader = CatalogReaderFactory.Create(_catalog);

            if (SavedInTombstone)
            {
                LoadState(ToString());
            }

            LoadItems();
        }
Exemplo n.º 2
0
        protected override void OnViewLoaded(object view)
        {
            base.OnViewLoaded(view);

            if (CatalogId <= 0)
            {
                throw new ArgumentException("CatalogId is not set in CatalogPageViewModel.");
            }

            _catalog = CatalogRepository.Get(CatalogId);
            if (_catalog == null)
            {
                return;
            }

            _catalogAuthorizationService = _catalogAuthorizationFactory.GetAuthorizationService(_catalog);
            NotifyOfPropertyChange("IsAuthorized");

            CatalogReader = CatalogReaderFactory.Create(_catalog);

            if (SavedInTombstone)
            {
                LoadState(ToString());
            }

            LoadItems();
        }