November Happy Hour will be moved to Thursday December 5th.

Class ContentDataInterceptorHandler

This class is a concrete implementation of ContentDataInterceptorHandler which uses the the Castle.Windsor.WindsorContainer to register runtime proxy for the model types.

Inheritance
System.Object
ContentDataInterceptorHandler
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.DataAbstraction.RuntimeModel
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
[ServiceConfiguration(typeof(ContentDataInterceptorHandler), Lifecycle = ServiceInstanceScope.Singleton)]
[ServiceConfiguration(typeof(IContentDataActivator), FactoryMember = "GetContentDataActivator", Lifecycle = ServiceInstanceScope.Singleton)]
public class ContentDataInterceptorHandler

Constructors

ContentDataInterceptorHandler(ConstructorParameterResolver)

Initializes a new instance of the ContentDataInterceptorHandler class.

Declaration
public ContentDataInterceptorHandler(ConstructorParameterResolver constructorResolver)
Parameters
Type Name Description
ConstructorParameterResolver constructorResolver

The constructor resolver.

Properties

ContentDataActivator

Gets an instance of IContentDataActivator.

Declaration
public virtual IContentDataActivator ContentDataActivator { get; }
Property Value
Type Description
IContentDataActivator

An instance of ContentDataInterceptor.

Remarks

The IContentDataActivator uses the ContentDataInterceptor registered to instansiate ContentData objects.

Methods

For<TPropertyData>()

Registers a custom accessor for a PropertyData type.

Declaration
public virtual PropertyDataInterceptor<TPropertyData> For<TPropertyData>()
    where TPropertyData : PropertyData
Returns
Type Description
PropertyDataInterceptor<TPropertyData>
Type Parameters
Name Description
TPropertyData

The type of the property data.

GetContentDataActivator()

Gets the IContentDataActivator registered in the current ServiceLocator.

Declaration
public static IContentDataActivator GetContentDataActivator()
Returns
Type Description
IContentDataActivator

The current IContentDataActivator.

GetPropertyInterceptor(Type)

Tries the get property interceptor.

Declaration
public virtual IPropertyDataInterceptor GetPropertyInterceptor(Type type)
Parameters
Type Name Description
System.Type type

The type.

Returns
Type Description
IPropertyDataInterceptor

RegisterDefaultPropertyAccessor()

Registers the default property accessor.

Declaration
protected virtual void RegisterDefaultPropertyAccessor()

RegisterInterceptor(IEnumerable<Type>, ContentDataInterceptor)

Registers an interceptor for a collection of System.Type.

Declaration
public virtual void RegisterInterceptor(IEnumerable<Type> modelTypes, ContentDataInterceptor interceptor)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Type> modelTypes

The model types.

ContentDataInterceptor interceptor

The interceptor.

Remarks

Interceptors are scoped as singleton per modeltype for performance reasons

RegisterInterceptor(Type, ContentDataInterceptor)

Registers an interceptor for a specific System.Type.

Declaration
public virtual void RegisterInterceptor(Type modelType, ContentDataInterceptor interceptor)
Parameters
Type Name Description
System.Type modelType

Type of the model.

ContentDataInterceptor interceptor

The interceptor.

Remarks

Interceptors are scoped as singleton per modeltype for performance reasons

RegisterPropertyInterceptor()

Registers the property interceptor.

Declaration
public virtual void RegisterPropertyInterceptor()

SetPropertyInterceptor(Type, IPropertyDataInterceptor)

Sets the property interceptor.

Declaration
public virtual void SetPropertyInterceptor(Type propertyType, IPropertyDataInterceptor propertyInterceptor)
Parameters
Type Name Description
System.Type propertyType

Type of the property.

IPropertyDataInterceptor propertyInterceptor

The property interceptor.

Extension Methods