protected T GetData <T>() where T : class { if (!HasData) { throw new InvalidOperationException("Page state not available!"); } // return(PageDataCache.Get <T>(GetType())); }
protected void SetLoaded(object data) { isLoaded = true; if (data == null || (data as IList)?.Count == 0) { ContentType = PageContentType.Empty; } else { ContentType = PageContentType.Content; } // Keep page data PageDataCache.Save(GetType(), data); }
protected void ClearLoaded() { isLoaded = false; PageDataCache.ClearData(GetType()); }