Table of Contents

Class AbstractInfo<TInfo, TInfoProviderInterface>

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Abstract object info class.

public abstract class AbstractInfo<TInfo, TInfoProviderInterface> : AbstractInfo<TInfo>, IExtensible, IInfo, IAdvancedDataContainer, ICMSObject, IHierarchicalDataContainer, IDataContainer, ISimpleDataContainer, IVirtualHierarchicalObject, IHierarchicalObject, INameIndexable, IMacroObject where TInfo : AbstractInfo<TInfo>, new()

Type Parameters

TInfo

Type of info object inheriting this class.

TInfoProviderInterface

Provider interface type for info object management.

Inheritance
object
AbstractInfo<TInfo, TInfoProviderInterface>
Implements
Derived
Inherited Members
Extension Methods

Constructors

AbstractInfo()

Constructor.

protected AbstractInfo()

AbstractInfo(IDataClass)

Constructor - Initializes the object with source data.

protected AbstractInfo(IDataClass sourceData)

Parameters

sourceData IDataClass

Source data

AbstractInfo(ObjectTypeInfo)

Constructor - Initializes the type dependent values.

protected AbstractInfo(ObjectTypeInfo typeInfo)

Parameters

typeInfo ObjectTypeInfo

Type information

AbstractInfo(ObjectTypeInfo, IDataClass, bool)

Constructor - Initializes the object with source data.

protected AbstractInfo(ObjectTypeInfo typeInfo, IDataClass sourceData, bool keepSourceData)

Parameters

typeInfo ObjectTypeInfo

Type information

sourceData IDataClass

Source data

keepSourceData bool

If true, source data are kept

AbstractInfo(ObjectTypeInfo, bool)

Constructor - Initializes the type dependent values.

protected AbstractInfo(ObjectTypeInfo typeInfo, bool createData)

Parameters

typeInfo ObjectTypeInfo

Type information

createData bool

If true, data structure of the object is created

AbstractInfo(ObjectTypeInfo, DataRow)

Constructor - Initializes the type dependent values.

protected AbstractInfo(ObjectTypeInfo typeInfo, DataRow dr)

Parameters

typeInfo ObjectTypeInfo

Type information

dr DataRow

DataRow with the source data

Properties

Provider

Gets the provider for TInfo management.

public static TInfoProviderInterface Provider { get; }

Property Value

TInfoProviderInterface

Remarks

The provider instance can be retrieved by specifying a constructor dependency on TInfoProviderInterface. However, in scenarios where dependency injection is not possible (such as legacy code), this property can be used to access the provider instance.

See Also
Resolve<TService>()

Methods

Validate()

Validates whether the info object's state satisfies domain specific constraints and returns the validation result.

protected override InfoValidationResult Validate()

Returns

InfoValidationResult

Returns validation result with IsValid set to true, if value is valid. Otherwise returns result with the flag set to false and a corresponding error message.

Remarks

The default implementation always returns Success. Override the method to perform domain specific info object validation.