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.Server.ObjectFactory Class Reference

Base class to be used when creating a data portal factory object. More...

Inheritance diagram for Csla.Server.ObjectFactory:
Csla.Core.GraphMerger

Protected Member Functions

void SetIsReadOnly (object obj, bool value)
 Sets the IsReadOnly property on the specified object, if possible. More...
 
void CheckRules (object obj)
 Calls the ValidationRules.CheckRules() method on the specified object, if possible. More...
 
void MarkOld (object obj)
 Calls the MarkOld method on the specified object, if possible. More...
 
void MarkNew (object obj)
 Calls the MarkNew method on the specified object, if possible. More...
 
void MarkAsChild (object obj)
 Calls the MarkAsChild method on the specified object, if possible. More...
 
void LoadProperty< P > (object obj, PropertyInfo< P > propertyInfo, P newValue)
 Loads a property's managed field with the supplied value. More...
 
void LoadProperty (object obj, IPropertyInfo propertyInfo, object newValue)
 Loads a property's managed field with the supplied value. More...
 
ReadProperty< P > (object obj, PropertyInfo< P > propertyInfo)
 Reads a property's managed field value. More...
 
object ReadProperty (object obj, IPropertyInfo propertyInfo)
 Reads a property's managed field value. More...
 
IDisposable BypassPropertyChecks (Csla.Core.BusinessBase businessObject)
 By wrapping this property inside Using block you can set property values on businessObject business object without raising PropertyChanged events and checking user rights. More...
 
bool FieldExists (object obj, Csla.Core.IPropertyInfo property)
 Gets a value indicating whether a managed field exists for the specified property. More...
 
Csla.Core.MobileList< C > GetDeletedList< C > (object obj)
 Gets the list of deleted items from an editable collection. More...
 

Detailed Description

Base class to be used when creating a data portal factory object.

Definition at line 22 of file ObjectFactory.cs.

Member Function Documentation

◆ BypassPropertyChecks()

IDisposable Csla.Server.ObjectFactory.BypassPropertyChecks ( Csla.Core.BusinessBase  businessObject)
protected

By wrapping this property inside Using block you can set property values on businessObject business object without raising PropertyChanged events and checking user rights.

Parameters
businessObjectObject on with you would like to set property values
Returns
An instance of IDisposable object that allows bypassing of normal authorization checks during property setting.

Definition at line 204 of file ObjectFactory.cs.

◆ CheckRules()

void Csla.Server.ObjectFactory.CheckRules ( object  obj)
protected

Calls the ValidationRules.CheckRules() method on the specified object, if possible.

Parameters
objObject on which to call the method.

Definition at line 44 of file ObjectFactory.cs.

◆ FieldExists()

bool Csla.Server.ObjectFactory.FieldExists ( object  obj,
Csla.Core.IPropertyInfo  property 
)
protected

Gets a value indicating whether a managed field exists for the specified property.

Parameters
objBusiness object.
propertyProperty info object.

Definition at line 215 of file ObjectFactory.cs.

◆ GetDeletedList< C >()

Csla.Core.MobileList< C > Csla.Server.ObjectFactory.GetDeletedList< C > ( object  obj)
protected

Gets the list of deleted items from an editable collection.

Template Parameters
CType of child objects in the colletion.
Parameters
objEditable collection object.

Definition at line 230 of file ObjectFactory.cs.

◆ LoadProperty()

void Csla.Server.ObjectFactory.LoadProperty ( object  obj,
IPropertyInfo  propertyInfo,
object  newValue 
)
protected

Loads a property's managed field with the supplied value.

Parameters
objObject on which to call the method.
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 141 of file ObjectFactory.cs.

◆ LoadProperty< P >()

void Csla.Server.ObjectFactory.LoadProperty< P > ( object  obj,
PropertyInfo< P >  propertyInfo,
newValue 
)
protected

Loads a property's managed field with the supplied value.

Template Parameters
PType of the property.
Parameters
objObject on which to call the method.
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 120 of file ObjectFactory.cs.

◆ MarkAsChild()

void Csla.Server.ObjectFactory.MarkAsChild ( object  obj)
protected

Calls the MarkAsChild method on the specified object, if possible.

Parameters
objObject on which to call the method.

Definition at line 92 of file ObjectFactory.cs.

◆ MarkNew()

void Csla.Server.ObjectFactory.MarkNew ( object  obj)
protected

Calls the MarkNew method on the specified object, if possible.

Parameters
objObject on which to call the method.

Definition at line 76 of file ObjectFactory.cs.

◆ MarkOld()

void Csla.Server.ObjectFactory.MarkOld ( object  obj)
protected

Calls the MarkOld method on the specified object, if possible.

Parameters
objObject on which to call the method.

Definition at line 60 of file ObjectFactory.cs.

◆ ReadProperty()

object Csla.Server.ObjectFactory.ReadProperty ( object  obj,
IPropertyInfo  propertyInfo 
)
protected

Reads a property's managed field value.

Parameters
objObject on which to call the method.
propertyInfoPropertyInfo object containing property metadata.
Returns

No authorization checks occur when this method is called.

Definition at line 180 of file ObjectFactory.cs.

◆ ReadProperty< P >()

P Csla.Server.ObjectFactory.ReadProperty< P > ( object  obj,
PropertyInfo< P >  propertyInfo 
)
protected

Reads a property's managed field value.

Template Parameters
P
Parameters
objObject on which to call the method.
propertyInfoPropertyInfo object containing property metadata.

No authorization checks occur when this method is called.

Definition at line 162 of file ObjectFactory.cs.

◆ SetIsReadOnly()

void Csla.Server.ObjectFactory.SetIsReadOnly ( object  obj,
bool  value 
)
protected

Sets the IsReadOnly property on the specified object, if possible.

Parameters
objObject on which to operate.
valueNew value for IsReadOnly.

Definition at line 30 of file ObjectFactory.cs.