Click or drag to resize

EditableDomainObjectGetObjectState Method

Gets the resulting object state from a base object state and a row provider for the most derived row.

Namespace:  Aloe.SystemFrameworks.Domain
Assembly:  Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntax
public static ObjectState GetObjectState(
	DomainObject obj,
	ObjectState baseObjectState,
	RowProvider currentRowProvider
)

Parameters

obj
Type: Aloe.SystemFrameworks.DomainDomainObject
The object for which the state is obtained.
baseObjectState
Type: Aloe.SystemFrameworks.DomainObjectState
State of the base object.
currentRowProvider
Type: Aloe.SystemFrameworks.Domain.DataAccessRowProvider
The current row provider.

Return Value

Type: ObjectState
The calculated object state.
Exceptions
ExceptionCondition
ArgumentNullExceptioncurrentRowProvider
InvalidOperationExceptionWhen unexpected base object state or unexpected row state are met.
Remarks

This method is useful for calculating the final ObjectState of a domain object. It is usually used while overriding ObjectState.get method.

The method requires as parameter a RowProvider. The row provider is used while calculating the resulting object state. You should pass the row provider for the current row of the derived domain object. If the current derived object uses many row providers, you can combine them with consecutive calls to DomainObject.GetObjectState, passing the previous result as baseObjectState. In this case, make the last call with the provider for the most primary row.

Examples
//override ObjectState by using DomainObject.GetObjectState //the currentRowProvider is the row provider of the current class public override ObjectState ObjectState { get { return DomainObject.GetObjectState(base.ObjectState, currentRowProvider); } }
See Also