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
TInfoType of info object inheriting this class.
TInfoProviderInterfaceProvider interface type for info object management.
- Inheritance
-
objectAbstractInfoBase<TInfo>AbstractInfo<TInfo>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
sourceDataIDataClassSource data
AbstractInfo(ObjectTypeInfo)
Constructor - Initializes the type dependent values.
protected AbstractInfo(ObjectTypeInfo typeInfo)
Parameters
typeInfoObjectTypeInfoType information
AbstractInfo(ObjectTypeInfo, IDataClass, bool)
Constructor - Initializes the object with source data.
protected AbstractInfo(ObjectTypeInfo typeInfo, IDataClass sourceData, bool keepSourceData)
Parameters
typeInfoObjectTypeInfoType information
sourceDataIDataClassSource data
keepSourceDataboolIf true, source data are kept
AbstractInfo(ObjectTypeInfo, bool)
Constructor - Initializes the type dependent values.
protected AbstractInfo(ObjectTypeInfo typeInfo, bool createData)
Parameters
typeInfoObjectTypeInfoType information
createDataboolIf true, data structure of the object is created
AbstractInfo(ObjectTypeInfo, DataRow)
Constructor - Initializes the type dependent values.
protected AbstractInfo(ObjectTypeInfo typeInfo, DataRow dr)
Parameters
typeInfoObjectTypeInfoType information
drDataRowDataRow 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.