コード例 #1
0
        public PageDefinitionCollection List(int pageTypeId)
        {
            var result = new PageDefinitionCollection();

            result.AddRange(MapRecordsToExposedObjects(pageDefinitions.Where(pd => pd.PageTypeID == pageTypeId)));
            return(result);
        }
コード例 #2
0
 private FakePageType GetPageTypeToReturn(IPageType pageTypeRecord)
 {
     var definitions = new PageDefinitionCollection();
     definitions.AddRange(pageDefinitionFactory.List(pageTypeRecord.ID));
     var pageTypeToReturn = new FakePageType(definitions);
     Mapper.Map(pageTypeRecord, pageTypeToReturn);
     return pageTypeToReturn;
 }
コード例 #3
0
 public FakePageType(PageDefinitionCollection pageDefinitions)
 {
     var template = new PageType();
     AllowedPageTypes = template.AllowedPageTypes;
     DefaultArchivePageLink = template.DefaultArchivePageLink;
     DefaultChildOrderRule = template.DefaultChildOrderRule;
     DefaultPageName = template.DefaultPageName;
     DefaultPeerOrder = template.DefaultPeerOrder;
     DefaultStartPublishOffset = template.DefaultStartPublishOffset;
     DefaultStopPublishOffset = template.DefaultStopPublishOffset;
     DefaultVisibleInMenu = template.DefaultVisibleInMenu;
     Definitions = pageDefinitions;
     Description = template.Description;
     IsAvailable = template.IsAvailable;
     Name = template.Name;
     SortOrder = template.SortOrder;
     Defaults = new PageTypeDefault();
 }
 public PageDefinitionCollection List(int pageTypeId)
 {
     var result = new PageDefinitionCollection();
     result.AddRange(MapRecordsToExposedObjects(pageDefinitions.Where(pd => pd.PageTypeID == pageTypeId)));
     return result;
 }