Class PropertyRenderingScope
A helper object that can be used when rendering content in for example a ContentArea. It keeps track of which content that is currently rendered. This is needed to be able to output edit attributes for correct elements.
Inheritance
Implements
Namespace: EPiServer.Web.Templating
Assembly: EPiServer.Cms.AspNetCore.Templating.dll
Version: 12.0.3Syntax
public class PropertyRenderingScope : Object, IDisposable
Remarks
This class implements System.IDisposable and instances should be used inside a using statement.
Constructors
PropertyRenderingScope(HttpContext, IPropertyDescriptor, TemplateModel, IEnumerable<String>)
Initializes a new instance of the ContentRenderingScope class.
Declaration
public PropertyRenderingScope(HttpContext context, IPropertyDescriptor propertyDescriptor, TemplateModel templateModel = null, IEnumerable<string> templateTags = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Http.HttpContext | context | |
| IPropertyDescriptor | propertyDescriptor | |
| TemplateModel | templateModel | |
| System.Collections.Generic.IEnumerable<System.String> | templateTags |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Triggers the end element when disposing is true
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
|
PopCurrentProperty(HttpContext)
Pops the current property from context. This should used in combination with PushCurrentProperty(HttpContext, IPropertyDescriptor, TemplateModel, IEnumerable<String>) and called when the property is done rendered.
Declaration
public static void PopCurrentProperty(HttpContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Http.HttpContext | context | The request context. |
PushCurrentProperty(HttpContext, IPropertyDescriptor, TemplateModel, IEnumerable<String>)
Adds to context that the property with given name is currently rendered.
Declaration
public static void PushCurrentProperty(HttpContext context, IPropertyDescriptor propertyDescriptor, TemplateModel templateModel = null, IEnumerable<string> templateTags = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Http.HttpContext | context | |
| IPropertyDescriptor | propertyDescriptor | |
| TemplateModel | templateModel | |
| System.Collections.Generic.IEnumerable<System.String> | templateTags |