Exemplo n.º 1
0
        protected T GetData <T>() where T : class
        {
            if (!HasData)
            {
                throw new InvalidOperationException("Page state not available!");
            }

            //
            return(PageDataCache.Get <T>(GetType()));
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 protected void ClearLoaded()
 {
     isLoaded = false;
     PageDataCache.ClearData(GetType());
 }