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

Base class for an object that is serializable using SerializationFormatterFactory.GetFormatter(). More...

Inheritance diagram for Csla.Core.ManagedObjectBase:
Csla.Core.MobileObject Csla.Serialization.Mobile.IMobileObject Csla.CommandBase< T > Csla.CriteriaBase< T >

Protected Member Functions

ReadPropertyConvert< F, P > (PropertyInfo< F > propertyInfo)
 Gets a property's value from the list of managed field values, converting the value to an appropriate type. More...
 
ReadProperty< P > (PropertyInfo< P > propertyInfo)
 Gets a property's value as a specified type. More...
 
virtual object ReadProperty (IPropertyInfo propertyInfo)
 Gets a property's value as a specified type. More...
 
void LoadPropertyConvert< P, F > (PropertyInfo< P > propertyInfo, F newValue)
 Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change. More...
 
void LoadProperty< P > (PropertyInfo< P > propertyInfo, P newValue)
 Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change. More...
 
virtual void LoadProperty (IPropertyInfo propertyInfo, object newValue)
 Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change. More...
 
virtual bool LoadPropertyMarkDirty (IPropertyInfo propertyInfo, object newValue)
 Loads the property vith new value and mark field dirty if value is changed. More...
 
void OnPropertyChanged (string propertyName)
 Raises the PropertyChanged event. More...
 
void OnPropertyChanged (IPropertyInfo propertyInfo)
 Raises the PropertyChanged event. More...
 
override void OnGetChildren (SerializationInfo info, MobileFormatter formatter)
 Override this method to manually retrieve child object data from the serializations stream. More...
 
override void OnSetChildren (SerializationInfo info, MobileFormatter formatter)
 Override this method to manually serialize child objects into the serialization stream. More...
 
virtual void OnDeserialized (System.Runtime.Serialization.StreamingContext context)
 This method is called on a newly deserialized object after deserialization is complete. More...
 
- Protected Member Functions inherited from Csla.Core.MobileObject
virtual void OnGetState (SerializationInfo info, StateMode mode)
 Override this method to insert your field values into the MobileFormatter serialzation stream. More...
 
virtual void OnSetState (SerializationInfo info, StateMode mode)
 Override this method to retrieve your field values from the MobileFormatter serialzation stream. More...
 

Static Protected Member Functions

static PropertyInfo< P > RegisterProperty< P > (Type objectType, PropertyInfo< P > info)
 Indicates that the specified property belongs to the type. More...
 
static PropertyInfo< P > RegisterProperty< T, P > (Expression< Func< T, object > > propertyLambdaExpression)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< T, P > (Expression< Func< T, object > > propertyLambdaExpression, P defaultValue)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< T, P > (Expression< Func< T, object > > propertyLambdaExpression, string friendlyName)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< T, P > (Expression< Func< T, object > > propertyLambdaExpression, string friendlyName, P defaultValue)
 Indicates that the specified property belongs to the business object type. More...
 

Properties

FieldDataManager FieldManager [get]
 Gets a reference to the field mananger for this object. More...
 

Additional Inherited Members

Detailed Description

Base class for an object that is serializable using SerializationFormatterFactory.GetFormatter().

Definition at line 27 of file ManagedObjectBase.cs.

Member Function Documentation

◆ LoadProperty()

virtual void Csla.Core.ManagedObjectBase.LoadProperty ( IPropertyInfo  propertyInfo,
object  newValue 
)
protectedvirtual

Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change.

Parameters
propertyInfoPropertyInfo object containing property metadata.
newValueThe new value for the property.

No authorization checks occur when this method is called, and no PropertyChanging or PropertyChanged events are raised. Loading values does not cause validation rules to be invoked.

Definition at line 359 of file ManagedObjectBase.cs.

◆ LoadProperty< P >()

void Csla.Core.ManagedObjectBase.LoadProperty< P > ( PropertyInfo< P >  propertyInfo,
newValue 
)
protected

Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change.

Template Parameters
PType of the property.
Parameters
propertyInfoPropertyInfo object containing property metadata.
newValueThe new value for the property.

No authorization checks occur when this method is called, and no PropertyChanging or PropertyChanged events are raised. Loading values does not cause validation rules to be invoked.

Definition at line 277 of file ManagedObjectBase.cs.

◆ LoadPropertyConvert< P, F >()

void Csla.Core.ManagedObjectBase.LoadPropertyConvert< P, F > ( PropertyInfo< P >  propertyInfo,
newValue 
)
protected

Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change.

Parameters
propertyInfoPropertyInfo object containing property metadata.
newValueThe new value for the property.

No authorization checks occur when this method is called, and no PropertyChanging or PropertyChanged events are raised. Loading values does not cause validation rules to be invoked.

Definition at line 232 of file ManagedObjectBase.cs.

◆ LoadPropertyMarkDirty()

virtual bool Csla.Core.ManagedObjectBase.LoadPropertyMarkDirty ( IPropertyInfo  propertyInfo,
object  newValue 
)
protectedvirtual

Loads the property vith new value and mark field dirty if value is changed.

Parameters
propertyInfoThe property info.
newValueThe new value.
Returns
[true] if changed, else [false]

Definition at line 374 of file ManagedObjectBase.cs.

◆ OnDeserialized()

virtual void Csla.Core.ManagedObjectBase.OnDeserialized ( System.Runtime.Serialization.StreamingContext  context)
protectedvirtual

This method is called on a newly deserialized object after deserialization is complete.

Parameters
contextSerialization context object.

Definition at line 494 of file ManagedObjectBase.cs.

◆ OnGetChildren()

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

Override this method to manually retrieve child object data from the serializations stream.

Parameters
infoSerialization info.
formatterReference to the SerializationFormatterFactory.GetFormatter().

Reimplemented from Csla.Core.MobileObject.

Definition at line 449 of file ManagedObjectBase.cs.

◆ OnPropertyChanged() [1/2]

void Csla.Core.ManagedObjectBase.OnPropertyChanged ( IPropertyInfo  propertyInfo)
protected

Raises the PropertyChanged event.

Parameters
propertyInfoThe property info object for the changed property.

Definition at line 434 of file ManagedObjectBase.cs.

◆ OnPropertyChanged() [2/2]

void Csla.Core.ManagedObjectBase.OnPropertyChanged ( string  propertyName)
protected

Raises the PropertyChanged event.

Parameters
propertyNameName of the changed property.

Definition at line 423 of file ManagedObjectBase.cs.

◆ OnSetChildren()

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

Override this method to manually serialize child objects into the serialization stream.

Parameters
infoSerialization info.
formatterReference to the SerializationFormatterFactory.GetFormatter().

Reimplemented from Csla.Core.MobileObject.

Definition at line 466 of file ManagedObjectBase.cs.

◆ ReadProperty()

virtual object Csla.Core.ManagedObjectBase.ReadProperty ( IPropertyInfo  propertyInfo)
protectedvirtual

Gets a property's value as a specified type.

Parameters
propertyInfoPropertyInfo object containing property metadata.

Definition at line 192 of file ManagedObjectBase.cs.

◆ ReadProperty< P >()

P Csla.Core.ManagedObjectBase.ReadProperty< P > ( PropertyInfo< P >  propertyInfo)
protected

Gets a property's value as a specified type.

Template Parameters
PType of the property.
Parameters
propertyInfoPropertyInfo object containing property metadata.

Definition at line 167 of file ManagedObjectBase.cs.

◆ ReadPropertyConvert< F, P >()

P Csla.Core.ManagedObjectBase.ReadPropertyConvert< F, P > ( PropertyInfo< F >  propertyInfo)
protected

Gets a property's value from the list of managed field values, converting the value to an appropriate type.

Template Parameters
FType of the field.
PType of the property.
Parameters
propertyInfoPropertyInfo object containing property metadata.

Definition at line 154 of file ManagedObjectBase.cs.

◆ RegisterProperty< P >()

static PropertyInfo< P > Csla.Core.ManagedObjectBase.RegisterProperty< P > ( Type  objectType,
PropertyInfo< P >  info 
)
staticprotected

Indicates that the specified property belongs to the type.

Template Parameters
PType of property.
Parameters
objectTypeType of object to which the property belongs.
infoPropertyInfo object for the property.
Returns
The provided IPropertyInfo object.

Definition at line 67 of file ManagedObjectBase.cs.

◆ RegisterProperty< T, P >() [1/4]

static PropertyInfo< P > Csla.Core.ManagedObjectBase.RegisterProperty< T, P > ( Expression< Func< T, object > >  propertyLambdaExpression)
staticprotected

Indicates that the specified property belongs to the business object type.

Template Parameters
TType of object to which the property belongs.
PType of property
Parameters
propertyLambdaExpressionProperty Expression
Returns
The provided IPropertyInfo object.

Definition at line 81 of file ManagedObjectBase.cs.

◆ RegisterProperty< T, P >() [2/4]

static PropertyInfo< P > Csla.Core.ManagedObjectBase.RegisterProperty< T, P > ( Expression< Func< T, object > >  propertyLambdaExpression,
defaultValue 
)
staticprotected

Indicates that the specified property belongs to the business object type.

Template Parameters
TType of Target
PType of property
Parameters
propertyLambdaExpressionProperty Expression
defaultValueDefault Value for the property
Returns

Definition at line 97 of file ManagedObjectBase.cs.

◆ RegisterProperty< T, P >() [3/4]

static PropertyInfo< P > Csla.Core.ManagedObjectBase.RegisterProperty< T, P > ( Expression< Func< T, object > >  propertyLambdaExpression,
string  friendlyName 
)
staticprotected

Indicates that the specified property belongs to the business object type.

Template Parameters
T
PType of property
Parameters
propertyLambdaExpressionProperty Expression
friendlyNameFriendly description for a property to be used in databinding
Returns
The provided IPropertyInfo object.

Definition at line 113 of file ManagedObjectBase.cs.

◆ RegisterProperty< T, P >() [4/4]

static PropertyInfo< P > Csla.Core.ManagedObjectBase.RegisterProperty< T, P > ( Expression< Func< T, object > >  propertyLambdaExpression,
string  friendlyName,
defaultValue 
)
staticprotected

Indicates that the specified property belongs to the business object type.

Template Parameters
TType of Target
PType of property
Parameters
propertyLambdaExpressionProperty Expression
friendlyNameFriendly description for a property to be used in databinding
defaultValueDefault Value for the property
Returns

Definition at line 130 of file ManagedObjectBase.cs.

Property Documentation

◆ FieldManager

FieldDataManager Csla.Core.ManagedObjectBase.FieldManager
getprotected

Gets a reference to the field mananger for this object.

Definition at line 37 of file ManagedObjectBase.cs.