Пример #1
0
        public static DbItemContainer GetItemContainer(ParsePage pageInfo)
        {
            var dbItemContainer = new DbItemContainer();

            if (pageInfo.ChannelItems.Count > 0)
            {
                dbItemContainer.ChannelItem = pageInfo.ChannelItems.Peek();
            }
            if (pageInfo.ContentItems.Count > 0)
            {
                dbItemContainer.ContentItem = pageInfo.ContentItems.Peek();
            }
            if (pageInfo.SqlItems.Count > 0)
            {
                dbItemContainer.SqlItem = pageInfo.SqlItems.Peek();
            }
            if (pageInfo.SiteItems.Count > 0)
            {
                dbItemContainer.SiteItem = pageInfo.SiteItems.Peek();
            }
            if (pageInfo.EachItems.Count > 0)
            {
                dbItemContainer.EachItem = pageInfo.EachItems.Peek();
            }
            return(dbItemContainer);
        }
Пример #2
0
 public static void PopEachItem(ParsePage pageInfo)
 {
     if (pageInfo.EachItems.Count > 0)
     {
         pageInfo.EachItems.Pop();
     }
 }
Пример #3
0
 public static void PopSiteItems(ParsePage pageInfo)
 {
     if (pageInfo.SiteItems.Count > 0)
     {
         pageInfo.SiteItems.Pop();
     }
 }
Пример #4
0
 public static void PopContentItem(ParsePage pageInfo)
 {
     if (pageInfo.ContentItems.Count > 0)
     {
         pageInfo.ContentItems.Pop();
     }
 }
Пример #5
0
 public static void PopChannelItem(ParsePage pageInfo)
 {
     if (pageInfo.ChannelItems.Count > 0)
     {
         pageInfo.ChannelItems.Pop();
     }
 }
Пример #6
0
 public ParseContext(ParsePage pageInfo)
 {
     Site      = pageInfo.Site;
     ChannelId = pageInfo.PageChannelId;
     ContentId = pageInfo.PageContentId;
 }