Class TemplateResolverEventArgs
Event argument used in ITemplateResolverEvents when a template is resolved for a requested content type.
Inheritance
Inherited Members
Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 10.10.4Syntax
public class TemplateResolverEventArgs : EventArgsConstructors
TemplateResolverEventArgs(Type, Object, IEnumerable<TemplateModel>, TemplateModel, IEnumerable<String>)
Initializes a new instance of the TemplateResolverEventArgs class.
Declaration
public TemplateResolverEventArgs(Type renderType, object itemToRender, IEnumerable<TemplateModel> templates, TemplateModel selectedTemplateModel, IEnumerable<string> tags)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Type | renderType | Type of the render. | 
| System.Object | itemToRender | The item that should be rendered. | 
| System.Collections.Generic.IEnumerable<TemplateModel> | templates | The template models. | 
| TemplateModel | selectedTemplateModel | The selected render model. | 
| System.Collections.Generic.IEnumerable<System.String> | tags | The tag. | 
TemplateResolverEventArgs(HttpContextBase, ContentType, Type, Object, IEnumerable<TemplateModel>, TemplateModel, String)
Initializes a new instance of the TemplateResolverEventArgs class.
Declaration
public TemplateResolverEventArgs(HttpContextBase httpContext, ContentType contentType, Type renderType, object itemToRender, IEnumerable<TemplateModel> templates, TemplateModel selectedTemplateModel, string tag)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Web.HttpContextBase | httpContext | The HTTP context. | 
| ContentType | contentType | Type of the content. | 
| System.Type | renderType | Type of the render. | 
| System.Object | itemToRender | The item that should be rendered. | 
| System.Collections.Generic.IEnumerable<TemplateModel> | templates | The template models. | 
| TemplateModel | selectedTemplateModel | The selected render model. | 
| System.String | tag | The tag. | 
Properties
ContentType
Gets the current ContentType.
Declaration
public ContentType ContentType { get; }Property Value
| Type | Description | 
|---|---|
| ContentType | 
ItemToRender
Gets the item that should be rendered.
Declaration
public object ItemToRender { get; }Property Value
| Type | Description | 
|---|---|
| System.Object | 
RenderType
Gets the current type to resolve template for.
Declaration
public Type RenderType { get; }Property Value
| Type | Description | 
|---|---|
| System.Type | 
RequestedCategory
The categorey that was requested for
Declaration
public TemplateTypeCategories RequestedCategory { get; set; }Property Value
| Type | Description | 
|---|---|
| TemplateTypeCategories | 
SelectedTemplate
Gets or sets the selected template.
Declaration
public TemplateModel SelectedTemplate { get; set; }Property Value
| Type | Description | 
|---|---|
| TemplateModel | 
SupportedTemplates
Gets all supported templates that has been registered for the current template request.
Declaration
public IEnumerable<TemplateModel> SupportedTemplates { get; }Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<TemplateModel> | 
Tag
Gets or sets the tag.
Declaration
public string Tag { get; set; }Property Value
| Type | Description | 
|---|---|
| System.String | 
Tags
Gets or sets the template tags that should be or has been used to resolve the template.
Declaration
public IEnumerable<string> Tags { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<System.String> | 
WebContext
Gets or sets the HTTP context.
Declaration
public HttpContextBase WebContext { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Web.HttpContextBase | The HTTP context. | 
