Example #1
0
        private PageContentState GetCurrentPageContentState()
        {
            // we check if an intermediate state is available
            if (_intermediateState != null)
            {
                var _state = _intermediateState;
                _intermediateState = null;           // reset it
                return(_state);
            }

            // we check the page has a url
            if (string.IsNullOrEmpty(this.Url))
            {
                return(null);
            }

            // we also add
            return(new PageContentState(this.Url, this.CurrentNavigationRequest != null ? this.CurrentNavigationRequest.SiteArea : null, this.Title,
                                        (CurrentNavigationStateSupporter == null ? null : CurrentNavigationStateSupporter.SaveState()),
                                        (CurrentNavigationViewStateSupporter == null) ? null : CurrentNavigationViewStateSupporter.SaveState()));
        }
Example #2
0
        private PageContentState GetCurrentPageContentState()
        {
            // we check the page has a url
            if (base.CurrentNavigationRequest == null)
            {
                return(null);
            }

            // we return the state
            return(new PageContentState(this.Url, CurrentNavigationRequest != null ? CurrentNavigationRequest.SiteArea : null, this.Title,
                                        (CurrentNavigationStateSupporter == null ? null : CurrentNavigationStateSupporter.SaveState()),
                                        (CurrentNavigationViewStateSupporter == null) ? null : CurrentNavigationViewStateSupporter.SaveState()));
        }
Example #3
0
        private PageContentState GetCurrentPageContentState()
        {
            // we check the page has a url
            if (string.IsNullOrEmpty(this.Url))
            {
                return(null);
            }

            // we also add
            return(new PageContentState(this.Url, CurrentNavigationRequest != null ? CurrentNavigationRequest.SiteArea : null, this.Title,
                                        (CurrentNavigationStateSupporter == null ? null : CurrentNavigationStateSupporter.SaveState()),
                                        (CurrentNavigationViewStateSupporter == null) ? null : CurrentNavigationViewStateSupporter.SaveState()));
        }