/// <summary> /// Filters the specified pages. /// </summary> /// <param name="pages">The pages.</param> public void Filter(PageDataCollection pages) { var output = new PageDataCollection(); pages.Where(x => !this.notAllowedPageTypes.Any(k => k == x.PageTypeName)).ToList().ForEach(l => output.Add(l)); pages.Clear(); output.ToList().ForEach(x => pages.Add(x)); }
private List <PageData> Sort(IEnumerable <PageData> pages, FilterSortOrder sortOrder) { var asCollection = new PageDataCollection(pages); var sortFilter = new FilterSort(sortOrder); sortFilter.Sort(asCollection); return(asCollection.ToList()); }
protected void SearchEvents() { var allEvents = ParticipantProviderManager.Provider.GetEventPages(); var upcomingEvents = (from PageData p in allEvents orderby((EventPageBase)p).EventDetails.EventStart where ((EventPageBase)p).EventDetails.EventStart >= FromDateTime && ((EventPageBase)p).EventDetails.EventEnd <= ToDateTime select p); var upcomingEventPages = new PageDataCollection(upcomingEvents); new EPiServer.Filters.FilterAccess(EPiServer.Security.AccessLevel.Publish).Filter(upcomingEventPages); (AttendParticipantList as ParticipantList).SetEventPageBaseList(upcomingEventPages.ToList <PageData>()); }
protected void SearchEvents() { var allEvents = ParticipantProviderManager.Provider.GetEventPages(); var upcomingEvents = (from PageData p in allEvents orderby ((EventPageBase)p).EventDetails.EventStart where ((EventPageBase)p).EventDetails.EventStart >= FromDateTime && ((EventPageBase)p).EventDetails.EventEnd <= ToDateTime select p); var upcomingEventPages = new PageDataCollection(upcomingEvents); new EPiServer.Filters.FilterAccess(EPiServer.Security.AccessLevel.Publish).Filter(upcomingEventPages); (AttendParticipantList as ParticipantList).SetEventPageBaseList(upcomingEventPages.ToList<PageData>()); }