Represents the current Redakt CMS request context.

public interface IRedaktContext

Properties

ApplicationContext
Collection Gets the collection instance for the current request.
Host Gets the host for the current request.
PublishedContent Gets the published page instance for the current request.
ViewModel Gets the view model instance for the current request.
View Gets the view descriptor instance for the current request.
RouteValues Gets the virtual route values for the current request.
RequestUICulture Gets the culture for the current request. Can only be one of the current site supported cultures.
ClientUICulture Gets the client request culture. Does not have to be a site supported culture.
HttpContext
Url

Extension Methods

AncestorsAsync<TModel>(IRedaktContext, string, Func<TModel, bool>, Nullable<CultureInfo>)
AncestorsAsync(IRedaktContext, string, Func<dynamic, bool>, Nullable<CultureInfo>)
ChildrenAsync<TModel>(IRedaktContext, string, Func<TModel, bool>, Nullable<CultureInfo>)
ChildrenAsync(IRedaktContext, string, Func<dynamic, bool>, Nullable<CultureInfo>)
DescendantsAsync<TModel>(IRedaktContext, string, Func<dynamic, bool>, Nullable<CultureInfo>) Retrieves all descendant of a given view model type with an optional filter.
FirstChildAsync<TModel>(IRedaktContext, string, Func<TModel, bool>, Nullable<CultureInfo>)
FirstChildAsync(IRedaktContext, string, Func<dynamic, bool>, Nullable<CultureInfo>)
FirstDescendantAsync<TModel>(IRedaktContext, string, Func<TModel, bool>, Nullable<CultureInfo>) Retrieves the breadth-first descendant of a given view model type with an optional filter.
ModelAsync<TModel>(IRedaktContext, string, Nullable<CultureInfo>) Gets the view model for the specified node id and culture. Returns null if the content model cannot be cast to TModel.
ModelAsync<TModel>(IRedaktContext, Link, Nullable<CultureInfo>) Gets the view model for the specified link and culture. Returns null if the content model cannot be cast to TModel.
ModelAsync<TModel>(IRedaktContext, IPublishedContent) Gets the view model for the specified published content object. Returns null if the content model cannot be cast to TModel.
ModelsAsync<TModel>(IRedaktContext, IEnumerable<string>, Func<TModel, bool>, Nullable<CultureInfo>) Gets a list of view models for the specified node ids and culture. Only returns models for content that can be cast to TModel.
ModelsAsync<TModel>(IRedaktContext, IEnumerable<Link>, Func<TModel, bool>, Nullable<CultureInfo>) Gets a list of view models for the specified node ids and culture. Only returns models for content that can be cast to TModel.
ModelsAsync<TModel>(IRedaktContext, IEnumerable<IPublishedContent>, Func<TModel, bool>) Gets a list of view models for the specified published content objects. Only returns models for content that can be cast to TModel.
ParentAsync<TModel>(IRedaktContext, string, Nullable<CultureInfo>)
ParentAsync(IRedaktContext, string, Nullable<CultureInfo>)
RootAsync<TModel>(IRedaktContext, INodeCollection, Nullable<CultureInfo>) Gets the root page view model for the specified site and culture.

Implemented by

RedaktContext Default implementation of the IRedaktContext interface. This class is scoped per request.