Пример #1
0
        public static bool IsContentPage(this SiteContent content)
        {
            if (content == null)
            {
                return(false);
            }

            return(content.ContentType == ContentType.ContentPage);
        }
Пример #2
0
        public static bool IsPublished(this SiteContent content)
        {
            if (content == null)
            {
                return(false);
            }

            return(content.SiteContentStatusID == (int)ContentStatus.Published && content.PublishDateUtc <= DateTime.UtcNow);
        }
Пример #3
0
        public static SiteContentVersion GetAffiliateVersion(this SiteContent content, int affiliateId)
        {
            if (content == null || content.Versions == null)
            {
                return(null);
            }

            return(content.Versions.FirstOrDefault(v => v.Affiliates.Any(a => a.AffiliateID == affiliateId)));
        }