private IEnumerable <PageViewZone> EnumeratePageViewZones(long pageId, IEnumerable <MasterPageZone> masterPageZones)
 {
     foreach (MasterPageZone masterPageZone in masterPageZones)
     {
         PageViewZone pageViewZone = GetPageViewZoneFromMasterPageZone(pageId, masterPageZone);
         yield return(pageViewZone);
     }
 }
 private IEnumerable <PageViewZone> EnumeratePageViewZones(MasterPage masterPage, Page page)
 {
     foreach (MasterPageZone masterPageZone in masterPage.MasterPageZones)
     {
         PageViewZone pageViewZone = new PageViewZone
         {
             MasterPageZoneId     = masterPageZone.MasterPageZoneId,
             BeginRender          = masterPageZone.BeginRender,
             EndRender            = masterPageZone.EndRender,
             PageViewZoneElements = SearchPageViewZoneElements(masterPage, page, masterPageZone)
         };
         yield return(pageViewZone);
     }
 }
        private PageViewZone GetPageViewZoneFromMasterPageZone(long pageId, MasterPageZone masterPageZone)
        {
            PageViewZone pageViewZone = new PageViewZone
            {
                TenantId         = masterPageZone.TenantId,
                MasterPageId     = masterPageZone.MasterPageId,
                MasterPageZoneId = masterPageZone.MasterPageZoneId,
                PageId           = pageId,
                BeginRender      = masterPageZone.BeginRender,
                EndRender        = masterPageZone.EndRender
            };

            return(pageViewZone);
        }
Exemple #4
0
        private async Task <PageViewZone> GetPageViewZoneFromMasterPageZoneAsync(Page page, MasterPageZone masterPageZone)
        {
            PageViewZone pageViewZone = new PageViewZone
            {
                TenantId             = masterPageZone.TenantId,
                MasterPageId         = masterPageZone.MasterPageId,
                MasterPageZoneId     = masterPageZone.MasterPageZoneId,
                PageId               = page.PageId,
                BeginRender          = masterPageZone.BeginRender,
                EndRender            = masterPageZone.EndRender,
                PageViewZoneElements = await SearchPageViewZoneElementsAsync(page, masterPageZone)
            };

            return(pageViewZone);
        }