Ejemplo n.º 1
0
        public IContentRepositoryQueryContext <PageDirectoryNode> AsNode()
        {
            var query = new GetPageDirectoryNodeByIdQuery(_pageDirectoryId);

            return(ContentRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns a page directory with the specified id as a PageDirectoryNode 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 <PageDirectoryNode> GetPageDirectoryNodeByIdAsync(int pageDirectoryId, IExecutionContext executionContext = null)
        {
            var query = new GetPageDirectoryNodeByIdQuery(pageDirectoryId);

            return(_queryExecutor.ExecuteAsync(query, executionContext));
        }
Ejemplo n.º 3
0
        public Task <PageDirectoryNode> AsNodeAsync()
        {
            var query = new GetPageDirectoryNodeByIdQuery(_pageDirectoryId);

            return(ExtendableContentRepository.ExecuteQueryAsync(query));
        }