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

Class BackingTypeResolver

Resolves the base type from a specified type, by matching the type against types registered in IPropertyDefinitionTypeRepository.

Inheritance
System.Object
BackingTypeResolver
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
Assembly: EPiServer.dll
Version: 8.11.0
Syntax
[ServiceConfiguration(typeof(BackingTypeResolver), Lifecycle = ServiceInstanceScope.Singleton)]
public class BackingTypeResolver
Remarks

A list of default backing types can be found in the SDK in chapter "Property types".

Examples

Sample showing how to use BackingTypeResolver to get the backing type from a PropertyDefinitionModel instance.

Constructors

BackingTypeResolver(IPropertyDefinitionTypeRepository, IPropertyDataFactory)

Initializes a new instance of the BackingTypeResolver class.

Declaration
public BackingTypeResolver(IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository, IPropertyDataFactory propertyDataFactory)
Parameters
Type Name Description
IPropertyDefinitionTypeRepository propertyDefinitionTypeRepository

The property definition type repository.

IPropertyDataFactory propertyDataFactory

The property data factory.

Properties

Boolean

PropertyData type for a boolean.

Declaration
protected virtual Type Boolean { get; }
Property Value
Type Description
System.Type

DateTime

PropertyData type for a date time.

Declaration
protected virtual Type DateTime { get; }
Property Value
Type Description
System.Type

Double

PropertyData type for a double.

Declaration
protected virtual Type Double { get; }
Property Value
Type Description
System.Type

Int32

PropertyData type for an int32.

Declaration
protected virtual Type Int32 { get; }
Property Value
Type Description
System.Type

PageType

PropertyData type for a page type

Declaration
protected virtual Type PageType { get; }
Property Value
Type Description
System.Type

String

PropertyData type for a string

Declaration
protected virtual Type String { get; }
Property Value
Type Description
System.Type

TimeSpan

PropertyData type for a time span.

Declaration
protected virtual Type TimeSpan { get; }
Property Value
Type Description
System.Type

Url

PropertyData type for an URL.

Declaration
protected virtual Type Url { get; }
Property Value
Type Description
System.Type

XForm

PropertyData type for a XForm

Declaration
protected virtual Type XForm { get; }
Property Value
Type Description
System.Type

XhtmlString

PropertyData type for a XHtml string

Declaration
protected virtual Type XhtmlString { get; }
Property Value
Type Description
System.Type

Methods

GetBackingType(PropertyDefinitionModel)

Gets the type of the backing.

Declaration
public virtual Type GetBackingType(PropertyDefinitionModel propertyDefinitionModel)
Parameters
Type Name Description
PropertyDefinitionModel propertyDefinitionModel

The property definition model.

Returns
Type Description
System.Type
Examples

Sample showing how BackingTypeResolver can be implemented.

GetDefaultBackingType(Type)

Gets the base type for a specified type

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

Type to get the base type for.

Returns
Type Description
System.Type

The base type

Examples

Sample showing how to use BackingTypeResolver to get the backing type from a PropertyDefinitionModel instance.

Extension Methods