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
Syntaxpublic static ObjectState GetObjectState(
DomainObject obj,
ObjectState baseObjectState,
RowProvider currentRowProvider
)
Public Shared Function GetObjectState (
obj As DomainObject,
baseObjectState As ObjectState,
currentRowProvider As RowProvider
) As ObjectState
public:
static ObjectState^ GetObjectState(
DomainObject^ obj,
ObjectState^ baseObjectState,
RowProvider^ currentRowProvider
)
static member GetObjectState :
obj : DomainObject *
baseObjectState : ObjectState *
currentRowProvider : RowProvider -> ObjectState
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
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