Class PropertyDataInterceptor<TPropertyData>
Used to handle how values should be retrevied and written to a PropertyData type.
Inheritance
System.Object
PropertyDataInterceptor<TPropertyData>
Implements
Namespace: EPiServer.DataAbstraction.RuntimeModel
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class PropertyDataInterceptor<TPropertyData> : Object, IPropertyDataInterceptor where TPropertyData : PropertyData
Type Parameters
Name | Description |
---|---|
TPropertyData |
Constructors
PropertyDataInterceptor()
Declaration
public PropertyDataInterceptor()
Methods
Use<TModelValue>(Func<TPropertyData, Object>, Action<TPropertyData, Object>)
Specifies which get and set accessors that should be used when accessing a Property
Declaration
public PropertyDataInterceptor<TPropertyData> Use<TModelValue>(Func<TPropertyData, object> getAccessor, Action<TPropertyData, object> setAccessor)
Parameters
Type | Name | Description |
---|---|---|
System. |
getAccessor | The get accessor. |
System. |
setAccessor | The set accessor. |
Returns
Type | Description |
---|---|
Property |
This instance. |
Type Parameters
Name | Description |
---|---|
TModelValue | The type of model value that the accessors should handle. |
Remarks
This can be used to register several TModelValue
to the same type of Property
Explicit Interface Implementations
IPropertyDataInterceptor.GetValue(PropertyData, Type)
Declaration
object IPropertyDataInterceptor.GetValue(PropertyData propertyData, Type returnType)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyData | |
System. |
returnType |
Returns
Type | Description |
---|---|
System. |
IPropertyDataInterceptor.SetValue(PropertyData, Type, Object)
Declaration
void IPropertyDataInterceptor.SetValue(PropertyData propertyData, Type valueType, object value)
Parameters
Type | Name | Description |
---|---|---|
Property |
propertyData | |
System. |
valueType | |
System. |
value |