Пример #1
0
        public IEnumerable <PageVersionSummary> Execute(GetPageVersionSummariesByPageIdQuery query, IExecutionContext executionContext)
        {
            var dbVersions = Query(query.PageId).ToList();
            var versions   = Map(dbVersions);

            return(versions);
        }
Пример #2
0
        public async Task <IEnumerable <PageVersionSummary> > ExecuteAsync(GetPageVersionSummariesByPageIdQuery query, IExecutionContext executionContext)
        {
            var dbVersions = await Query(query.PageId).ToListAsync();

            var versions = Map(dbVersions);

            return(versions);
        }
Пример #3
0
        public async Task <ICollection <PageVersionSummary> > ExecuteAsync(GetPageVersionSummariesByPageIdQuery query, IExecutionContext executionContext)
        {
            var dbVersions = await Query(query.PageId).ToListAsync();

            var versions = _pageVersionSummaryMapper.MapVersions(query.PageId, dbVersions);

            return(versions);
        }
        public async Task <PagedQueryResult <PageVersionSummary> > ExecuteAsync(GetPageVersionSummariesByPageIdQuery query, IExecutionContext executionContext)
        {
            var dbVersions = await Query(query.PageId).ToPagedResultAsync(query);

            var versions = _pageVersionSummaryMapper.MapVersions(query.PageId, dbVersions);

            return(versions);
        }
Пример #5
0
 /// <summary>
 /// Returns a paged collection of versions of a specific page, ordered
 /// historically with the latest/draft version first.
 /// </summary>
 /// <param name="query">Query parameters.</param>
 /// <param name="executionContext">Optional execution context to use when executing the query. Useful if you need to temporarily elevate your permission level.</param>
 public Task <PagedQueryResult <PageVersionSummary> > GetPageVersionSummariesByPageIdAsync(GetPageVersionSummariesByPageIdQuery query, IExecutionContext executionContext = null)
 {
     return(_queryExecutor.ExecuteAsync(query, executionContext));
 }
Пример #6
0
 public IContentRepositoryQueryContext <PagedQueryResult <PageVersionSummary> > AsVersionSummaries(GetPageVersionSummariesByPageIdQuery query)
 {
     return(ContentRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
 }
Пример #7
0
 public IEnumerable <IPermissionApplication> GetPermissions(GetPageVersionSummariesByPageIdQuery query)
 {
     yield return(new PageReadPermission());
 }
 public Task <PagedQueryResult <PageVersionSummary> > AsVersionSummariesAsync(GetPageVersionSummariesByPageIdQuery query)
 {
     return(ExtendableContentRepository.ExecuteQueryAsync(query));
 }