Пример #1
0
        public IContentRepositoryQueryContext <PageDirectoryRoute> AsRoute()
        {
            var query = new GetPageDirectoryRouteByIdQuery(_pageDirectoryId);

            return(ContentRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Пример #2
0
        /// <summary>
        /// Returns a page directory with the specified id as a PageDirectoryRoute instance.
        /// </summary>
        /// <param name="pageDirectoryId">PageDirectoryId of the directory to get.</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 <PageDirectoryRoute> GetPageDirectoryRouteByIdAsync(int pageDirectoryId, IExecutionContext executionContext = null)
        {
            var query = new GetPageDirectoryRouteByIdQuery(pageDirectoryId);

            return(_queryExecutor.ExecuteAsync(query, executionContext));
        }
Пример #3
0
        public Task <PageDirectoryRoute> AsRouteAsync()
        {
            var query = new GetPageDirectoryRouteByIdQuery(_pageDirectoryId);

            return(ExtendableContentRepository.ExecuteQueryAsync(query));
        }