CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Core.FieldManager.FieldDataManager Class Reference

Manages properties and property data for a business object. More...

Inheritance diagram for Csla.Core.FieldManager.FieldDataManager:
Csla.Core.MobileObject Csla.Core.IUndoableObject Csla.Core.IUseApplicationContext Csla.Serialization.Mobile.IMobileObject

Public Member Functions

 FieldDataManager ()
 Creates an instance of the type. More...
 
List< IPropertyInfoGetRegisteredProperties ()
 Returns a copy of the property list for the business object. More...
 
IPropertyInfo GetRegisteredProperty (string propertyName)
 Returns the IPropertyInfo object corresponding to the property name. More...
 
IFieldData GetFieldData (IPropertyInfo propertyInfo)
 Gets the IFieldData object for a specific field. More...
 
bool FieldExists (IPropertyInfo propertyInfo)
 Returns a value indicating whether an IFieldData entry exists for the specified property. More...
 
bool IsFieldDirty (IPropertyInfo propertyInfo)
 Gets a value indicating whether the specified field has been changed. More...
 
bool IsValid ()
 Returns a value indicating whether all fields are valid. More...
 
bool IsDirty ()
 Returns a value indicating whether any fields are dirty. More...
 
List< object > GetChildren ()
 Returns a list of all child objects contained in the list of fields. More...
 
void UpdateChildren (params object[] parameters)
 Invokes the data portal to update all child objects contained in the list of fields. More...
 
void UpdateAllChildren (params object[] parameters)
 Invokes the data portal to update all child objects, including those which are not dirty, contained in the list of fields. More...
 
async Task UpdateChildrenAsync (params object[] parameters)
 Asynchronously invokes the data portal to update all child objects contained in the list of fields. More...
 
async Task UpdateAllChildrenAsync (params object[] parameters)
 Asynchronously invokes the data portal to update all child objects, including those which are not dirty, contained in the list of fields. More...
 

Static Public Member Functions

static void ForceStaticFieldInit (Type type)
 Forces initialization of the static fields declared by a type, and any of its base class types. More...
 

Protected Member Functions

override void OnGetState (SerializationInfo info, StateMode mode)
 Override this method to insert your field values into the MobileFormatter serialzation stream. More...
 
override void OnGetChildren (SerializationInfo info, MobileFormatter formatter)
 Serializes child objects. More...
 
override void OnSetState (SerializationInfo info, StateMode mode)
 Override this method to retrieve your field values from the MobileFormatter serialzation stream. More...
 
override void OnSetChildren (SerializationInfo info, MobileFormatter formatter)
 Deserializes child objects. More...
 

Properties

bool HasFields [get]
 Gets a value indicating whether there are any managed fields available. More...
 
int EditLevel [get]
 Gets the current edit level of the object. More...
 
- Properties inherited from Csla.Core.IUndoableObject
int EditLevel [get]
 Gets the current edit level of the object. More...
 
- Properties inherited from Csla.Core.IUseApplicationContext
ApplicationContext ApplicationContext [getset]
 Gets or sets the current ApplicationContext object. More...
 

Detailed Description

Manages properties and property data for a business object.

Definition at line 34 of file FieldDataManager.cs.

Constructor & Destructor Documentation

◆ FieldDataManager()

Csla.Core.FieldManager.FieldDataManager.FieldDataManager ( )

Creates an instance of the type.

Definition at line 49 of file FieldDataManager.cs.

Member Function Documentation

◆ FieldExists()

bool Csla.Core.FieldManager.FieldDataManager.FieldExists ( IPropertyInfo  propertyInfo)

Returns a value indicating whether an IFieldData entry exists for the specified property.

Parameters
propertyInfoThe property corresponding to the field.

Definition at line 396 of file FieldDataManager.cs.

◆ ForceStaticFieldInit()

static void Csla.Core.FieldManager.FieldDataManager.ForceStaticFieldInit ( Type  type)
static

Forces initialization of the static fields declared by a type, and any of its base class types.

Parameters
typeType of object to initialize.

Definition at line 857 of file FieldDataManager.cs.

◆ GetChildren()

List< object > Csla.Core.FieldManager.FieldDataManager.GetChildren ( )

Returns a list of all child objects contained in the list of fields.

This method returns a list of actual child objects, not a list of IFieldData container objects.

Definition at line 618 of file FieldDataManager.cs.

◆ GetFieldData()

IFieldData Csla.Core.FieldManager.FieldDataManager.GetFieldData ( IPropertyInfo  propertyInfo)

Gets the IFieldData object for a specific field.

Parameters
propertyInfoThe property corresponding to the field.

Definition at line 231 of file FieldDataManager.cs.

◆ GetRegisteredProperties()

List< IPropertyInfo > Csla.Core.FieldManager.FieldDataManager.GetRegisteredProperties ( )

Returns a copy of the property list for the business object.

Returns null if there are no properties registered for this object.

Definition at line 82 of file FieldDataManager.cs.

◆ GetRegisteredProperty()

IPropertyInfo Csla.Core.FieldManager.FieldDataManager.GetRegisteredProperty ( string  propertyName)

Returns the IPropertyInfo object corresponding to the property name.

Parameters
propertyNameName of the property.
Returns
Exceptions
ArgumentOutOfRangeExceptionThrown if the property name doesn't correspond to a registered property.

Definition at line 95 of file FieldDataManager.cs.

◆ IsDirty()

bool Csla.Core.FieldManager.FieldDataManager.IsDirty ( )

Returns a value indicating whether any fields are dirty.

Definition at line 455 of file FieldDataManager.cs.

◆ IsFieldDirty()

bool Csla.Core.FieldManager.FieldDataManager.IsFieldDirty ( IPropertyInfo  propertyInfo)

Gets a value indicating whether the specified field has been changed.

Parameters
propertyInfoThe property corresponding to the field.
Returns
True if the field has been changed.

Definition at line 416 of file FieldDataManager.cs.

◆ IsValid()

bool Csla.Core.FieldManager.FieldDataManager.IsValid ( )

Returns a value indicating whether all fields are valid.

Definition at line 443 of file FieldDataManager.cs.

◆ OnGetChildren()

override void Csla.Core.FieldManager.FieldDataManager.OnGetChildren ( SerializationInfo  info,
MobileFormatter  formatter 
)
protectedvirtual

Serializes child objects.

Parameters
infoSerialization state
formatterSerializer instance

Reimplemented from Csla.Core.MobileObject.

Definition at line 747 of file FieldDataManager.cs.

◆ OnGetState()

override void Csla.Core.FieldManager.FieldDataManager.OnGetState ( SerializationInfo  info,
StateMode  mode 
)
protectedvirtual

Override this method to insert your field values into the MobileFormatter serialzation stream.

Parameters
infoObject containing the data to serialize.
modeThe StateMode indicating why this method was invoked.

Reimplemented from Csla.Core.MobileObject.

Definition at line 720 of file FieldDataManager.cs.

◆ OnSetChildren()

override void Csla.Core.FieldManager.FieldDataManager.OnSetChildren ( SerializationInfo  info,
MobileFormatter  formatter 
)
protectedvirtual

Deserializes child objects.

Parameters
infoSerialization state
formatterSerializer instance

Reimplemented from Csla.Core.MobileObject.

Definition at line 833 of file FieldDataManager.cs.

◆ OnSetState()

override void Csla.Core.FieldManager.FieldDataManager.OnSetState ( SerializationInfo  info,
StateMode  mode 
)
protectedvirtual

Override this method to retrieve your field values from the MobileFormatter serialzation stream.

Parameters
infoObject containing the data to serialize.
modeThe StateMode indicating why this method was invoked.

Reimplemented from Csla.Core.MobileObject.

Definition at line 773 of file FieldDataManager.cs.

◆ UpdateAllChildren()

void Csla.Core.FieldManager.FieldDataManager.UpdateAllChildren ( params object[]  parameters)

Invokes the data portal to update all child objects, including those which are not dirty, contained in the list of fields.

Parameters
parametersParamters for method

Definition at line 653 of file FieldDataManager.cs.

◆ UpdateAllChildrenAsync()

async Task Csla.Core.FieldManager.FieldDataManager.UpdateAllChildrenAsync ( params object[]  parameters)

Asynchronously invokes the data portal to update all child objects, including those which are not dirty, contained in the list of fields.

Parameters
parametersParameters for method

Definition at line 692 of file FieldDataManager.cs.

◆ UpdateChildren()

void Csla.Core.FieldManager.FieldDataManager.UpdateChildren ( params object[]  parameters)

Invokes the data portal to update all child objects contained in the list of fields.

Parameters
parametersParamters for method

Definition at line 633 of file FieldDataManager.cs.

◆ UpdateChildrenAsync()

async Task Csla.Core.FieldManager.FieldDataManager.UpdateChildrenAsync ( params object[]  parameters)

Asynchronously invokes the data portal to update all child objects contained in the list of fields.

Parameters
parametersParameters for method

Definition at line 672 of file FieldDataManager.cs.

Property Documentation

◆ EditLevel

int Csla.Core.FieldManager.FieldDataManager.EditLevel
get

Gets the current edit level of the object.

Definition at line 491 of file FieldDataManager.cs.

◆ HasFields

bool Csla.Core.FieldManager.FieldDataManager.HasFields
get

Gets a value indicating whether there are any managed fields available.

Definition at line 107 of file FieldDataManager.cs.