Try our conversational search powered by Generative AI!

Class MvcContentAreaValidator

Used to validate that content items are not rendered in a circular manner.

Inheritance
System.Object
MvcContentAreaValidator
Implements
System.IDisposable
Inherited Members
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.Mvc
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class MvcContentAreaValidator : IDisposable
Remarks

The though usage is to use the component in a using statement.

Constructors

MvcContentAreaValidator(HttpContextBase)

Initializes a new instance of the MvcContentAreaValidator class.

Declaration
public MvcContentAreaValidator(HttpContextBase httpContext)
Parameters
Type Name Description
System.Web.HttpContextBase httpContext

The HTTP context.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
Remarks

This is used to indicate that the item called in ExistInParentHierarchy(IContent, TemplateModel) has been written to output (that is including end element).

Dispose(Boolean)

Triggers the end element when disposing is true

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

true to write the end element.

ExistInParentHierarchy(IContent, TemplateModel)

Does a check if the instance already exist in parent hierarchy.

Declaration
public virtual bool ExistInParentHierarchy(IContent content, TemplateModel templateModel)
Parameters
Type Name Description
IContent content

The content.

TemplateModel templateModel

The template model.

Returns
Type Description
System.Boolean

Implements

System.IDisposable

Extension Methods