Class TemplateResolverEventArgs
Event argument used in TemplateResolver when a template is resolved for a requested content type.
Inheritance
System.Object
    System.EventArgs
    TemplateResolverEventArgs
  Inherited Members
      System.EventArgs.Empty
    
    
      System.Object.ToString()
    
    
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
  Namespace: EPiServer.Web
Assembly: EPiServer.dll
Version: 7.19.2Syntax
public class TemplateResolverEventArgs : EventArgsConstructors
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 | 
SelectedTemplate
Gets or sets the selected template.
Declaration
public TemplateModel SelectedTemplate { get; set; }Property Value
| Type | Description | 
|---|---|
| TemplateModel | 
SupportedTemplates
Gets the supported renders that are registered by scanning of attribute.
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 | The tag. | 
WebContext
Gets or sets the HTTP context.
Declaration
public HttpContextBase WebContext { get; set; }Property Value
| Type | Description | 
|---|---|
| System.Web.HttpContextBase | The HTTP context. | 
