This is the non-generic base class from which most business objects will be derived. More...
Classes | |
class | BypassPropertyChecksObject |
Class that allows setting of property values on current business object without raising PropertyChanged events and checking user rights. | |
Public Member Functions | |
virtual bool | CanReadProperty (Csla.Core.IPropertyInfo property) |
Returns true if the user is allowed to read the calling property. More... | |
bool | CanReadProperty (Csla.Core.IPropertyInfo property, bool throwOnFalse) |
Returns true if the user is allowed to read the calling property. More... | |
bool | CanReadProperty (string propertyName) |
Returns true if the user is allowed to read the specified property. More... | |
virtual bool | CanWriteProperty (Csla.Core.IPropertyInfo property) |
Returns true if the user is allowed to write the specified property. More... | |
bool | CanWriteProperty (Csla.Core.IPropertyInfo property, bool throwOnFalse) |
Returns true if the user is allowed to write the calling property. More... | |
bool | CanWriteProperty (string propertyName) |
Returns true if the user is allowed to write the specified property. More... | |
virtual bool | CanExecuteMethod (Csla.Core.IMemberInfo method) |
Returns true if the user is allowed to execute the specified method. More... | |
bool | CanExecuteMethod (Csla.Core.IMemberInfo method, bool throwOnFalse) |
Returns true if the user is allowed to execute the specified method. More... | |
virtual bool | CanExecuteMethod (string methodName) |
Returns true if the user is allowed to execute the specified method. More... | |
void | BeginEdit () |
Starts a nested edit on the object. More... | |
void | CancelEdit () |
Cancels the current edit process, restoring the object's state to its previous values. More... | |
void | ApplyEdit () |
Commits the current edit process. More... | |
virtual void | Delete () |
Marks the object for deletion. More... | |
virtual bool | IsPropertyBusy (Csla.Core.IPropertyInfo property) |
Gets a value indicating whether a specific property is busy (has a currently executing async rule). More... | |
bool | IsPropertyBusy (string propertyName) |
Gets a value indicating whether a specific property is busy (has a currently executing async rule). More... | |
BrokenRulesCollection | GetBrokenRules () |
Gets the broken rules for this object More... | |
Public Member Functions inherited from Csla.Security.IAuthorizeReadWrite | |
bool | CanWriteProperty (Csla.Core.IPropertyInfo property) |
Returns true if the user is allowed to write the to the specified property. More... | |
bool | CanReadProperty (Csla.Core.IPropertyInfo property) |
Returns true if the user is allowed to read the specified property. More... | |
bool | CanExecuteMethod (Csla.Core.IMemberInfo method) |
Returns true if the user is allowed to execute the specified method. More... | |
Public Member Functions inherited from Csla.Core.IParent | |
void | RemoveChild (Core.IEditableBusinessObject child) |
This method is called by a child object when it wants to be removed from the collection. More... | |
Protected Member Functions | |
BusinessBase () | |
Creates an instance of the object. More... | |
virtual void | Initialize () |
Override this method to set up event handlers so user code in a partial class can respond to events raised by generated code. More... | |
virtual void | SetParent (Core.IParent parent) |
Used by BusinessListBase as a child object is created to tell the child object about its parent. More... | |
virtual void | MarkNew () |
Marks the object as being a new object. More... | |
virtual void | MarkOld () |
Marks the object as being an old (not new) object. More... | |
void | MarkDeleted () |
Marks an object for deletion. More... | |
void | MarkDirty () |
Marks an object as being dirty, or changed. More... | |
void | MarkDirty (bool suppressEvent) |
Marks an object as being dirty, or changed. More... | |
virtual void | PropertyHasChanged (Csla.Core.IPropertyInfo property) |
Performs processing required when a property has changed. More... | |
virtual void | MetaPropertyHasChanged (string name) |
Raises OnPropertyChanged for meta properties (IsXYZ) when PropertyChangedMode is not Windows More... | |
virtual void | CheckPropertyRules (IPropertyInfo property) |
Check rules for the property and notifies UI of properties that may have changed. More... | |
virtual void | CheckObjectRules () |
Check object rules and notifies UI of properties that may have changed. More... | |
void | MarkClean () |
Forces the object's IsDirty flag to false. More... | |
override void | UndoChangesComplete () |
Called when an undo operation has completed. More... | |
override void | AcceptChangesComplete () |
Notifies the parent object (if any) that this child object's edits have been accepted. More... | |
void | MarkAsChild () |
Marks the object as being a child object. More... | |
virtual object | GetClone () |
Creates a clone of the object. More... | |
virtual void | OnValidationComplete () |
Raises the ValidationComplete event More... | |
BusinessRuleManager | GetRegisteredRules () |
Gets the registered rules. More... | |
virtual void | AddBusinessRules () |
Override this method in your business class to be notified when you need to set up shared business rules. More... | |
virtual void | DataPortal_OnDataPortalInvoke (DataPortalEventArgs e) |
Called by the server-side DataPortal prior to calling the requested DataPortal_XYZ method. More... | |
virtual void | DataPortal_OnDataPortalInvokeComplete (DataPortalEventArgs e) |
Called by the server-side DataPortal after calling the requested DataPortal_XYZ method. More... | |
virtual void | DataPortal_OnDataPortalException (DataPortalEventArgs e, Exception ex) |
Called by the server-side DataPortal if an exception occurs during data access. More... | |
virtual void | Child_Create () |
Override this method to load a new business object with default values from the database. More... | |
virtual void | Child_OnDataPortalInvoke (DataPortalEventArgs e) |
Called by the server-side DataPortal prior to calling the requested DataPortal_XYZ method. More... | |
virtual void | Child_OnDataPortalInvokeComplete (DataPortalEventArgs e) |
Called by the server-side DataPortal after calling the requested DataPortal_XYZ method. More... | |
virtual void | Child_OnDataPortalException (DataPortalEventArgs e, Exception ex) |
Called by the server-side DataPortal if an exception occurs during data access. More... | |
virtual void | OnDeserialized (System.Runtime.Serialization.StreamingContext context) |
This method is called on a newly deserialized object after deserialization is complete. More... | |
void | AddEventHooks (IBusinessObject child) |
For internal use. More... | |
virtual void | OnAddEventHooks (IBusinessObject child) |
Hook child object events. More... | |
void | RemoveEventHooks (IBusinessObject child) |
For internal use only. More... | |
virtual void | OnRemoveEventHooks (IBusinessObject child) |
Unhook child object events. More... | |
P | GetProperty< P > (string propertyName, P field, P defaultValue) |
Gets a property's value, first checking authorization. More... | |
P | GetProperty< P > (string propertyName, P field, P defaultValue, Security.NoAccessBehavior noAccess) |
Gets a property's value, first checking authorization. More... | |
P | GetProperty< P > (PropertyInfo< P > propertyInfo, P field) |
Gets a property's value, first checking authorization. More... | |
P | GetProperty< P > (PropertyInfo< P > propertyInfo, P field, P defaultValue, Security.NoAccessBehavior noAccess) |
Gets a property's value, first checking authorization. More... | |
P | GetPropertyConvert< F, P > (PropertyInfo< F > propertyInfo, F field) |
Gets a property's value as a specified type, first checking authorization. More... | |
P | GetPropertyConvert< F, P > (PropertyInfo< F > propertyInfo, F field, Security.NoAccessBehavior noAccess) |
Gets a property's value as a specified type, first checking authorization. More... | |
P | GetProperty< P > (PropertyInfo< P > propertyInfo) |
Gets a property's managed field value, first checking authorization. More... | |
P | GetPropertyConvert< F, P > (PropertyInfo< F > propertyInfo) |
Gets a property's value from the list of managed field values, first checking authorization, and converting the value to an appropriate type. More... | |
P | GetPropertyConvert< F, P > (PropertyInfo< F > propertyInfo, Security.NoAccessBehavior noAccess) |
Gets a property's value from the list of managed field values, first checking authorization, and converting the value to an appropriate type. More... | |
P | GetProperty< P > (PropertyInfo< P > propertyInfo, Security.NoAccessBehavior noAccess) |
Gets a property's value as a specified type, first checking authorization. More... | |
object | GetProperty (IPropertyInfo propertyInfo) |
Gets a property's value as a specified type. More... | |
P | GetProperty< P > (IPropertyInfo propertyInfo) |
Gets a property's managed field value, first checking authorization. More... | |
P | LazyGetProperty< P > (PropertyInfo< P > property, Func< P > valueGenerator) |
Lazily initializes a property and returns the resulting value. More... | |
P | LazyGetPropertyAsync< P > (PropertyInfo< P > property, Task< P > factory) |
Lazily initializes a property and returns the resulting value. More... | |
P | 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... | |
P | 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. More... | |
P | LazyReadProperty< P > (PropertyInfo< P > property, Func< P > valueGenerator) |
Gets a property's value as a specified type. More... | |
P | LazyReadPropertyAsync< P > (PropertyInfo< P > property, Task< P > factory) |
Gets a property's value as a specified type. More... | |
void | SetProperty< P > (PropertyInfo< P > propertyInfo, ref P field, P newValue) |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change. More... | |
void | SetProperty< P > (string propertyName, ref P field, P newValue) |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change. More... | |
void | SetPropertyConvert< P, V > (PropertyInfo< P > propertyInfo, ref P field, V newValue) |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change. More... | |
void | SetPropertyConvert< P, V > (PropertyInfo< P > propertyInfo, ref P field, V newValue, Security.NoAccessBehavior noAccess) |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change. More... | |
void | SetProperty< P > (string propertyName, ref P field, P newValue, Security.NoAccessBehavior noAccess) |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change. More... | |
void | SetPropertyConvert< P, V > (string propertyName, ref P field, V newValue, Security.NoAccessBehavior noAccess) |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change. More... | |
void | SetProperty< P > (PropertyInfo< P > propertyInfo, P newValue) |
Sets a property's managed field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change. More... | |
void | SetPropertyConvert< P, F > (PropertyInfo< P > propertyInfo, F newValue) |
Sets a property's managed field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change. More... | |
void | SetPropertyConvert< P, F > (PropertyInfo< P > propertyInfo, F newValue, Security.NoAccessBehavior noAccess) |
Sets a property's managed field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change. More... | |
void | SetProperty< P > (PropertyInfo< P > propertyInfo, P newValue, Security.NoAccessBehavior noAccess) |
Sets a property's managed field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change. More... | |
void | SetProperty (IPropertyInfo propertyInfo, object newValue) |
Sets a property's managed field with the supplied value, and then calls PropertyHasChanged if the value does change. More... | |
void | SetProperty< P > (IPropertyInfo propertyInfo, P newValue) |
Sets a property's managed field with the supplied value, and then calls PropertyHasChanged if the value does change. More... | |
void | LoadPropertyConvert< P, F > (PropertyInfo< P > propertyInfo, F newValue) |
Loads a property's managed field with the supplied value. More... | |
void | LoadProperty< P > (PropertyInfo< P > propertyInfo, P newValue) |
Loads a property's managed field with the supplied value. More... | |
bool | LoadPropertyMarkDirty< P > (PropertyInfo< P > propertyInfo, P newValue) |
Loads a property's managed field with the supplied value and mark field as dirty if value is modified. More... | |
virtual bool | LoadPropertyMarkDirty (IPropertyInfo propertyInfo, object newValue) |
Loads a property's managed field with the supplied value. More... | |
virtual void | LoadProperty (IPropertyInfo propertyInfo, object newValue) |
Loads a property's managed field with the supplied value. More... | |
void | LoadPropertyAsync< R > (PropertyInfo< R > property, Task< R > factory) |
Load a property from an async method. More... | |
void | MarkBusy () |
Mark the object as busy (it is running an async operation). More... | |
void | MarkIdle () |
Mark the object as not busy (it is not running an async operation). More... | |
virtual void | OnBusyChanged (BusyChangedEventArgs args) |
Raise the BusyChanged event. More... | |
virtual void | OnUnhandledAsyncException (ErrorEventArgs error) |
Raises the UnhandledAsyncException event. More... | |
void | OnUnhandledAsyncException (object originalSender, Exception error) |
Raises the UnhandledAsyncException event. More... | |
virtual void | OnChildChanged (ChildChangedEventArgs e) |
Raises the ChildChanged event, indicating that a child object has been changed. More... | |
virtual void | EditChildComplete (Core.IEditableBusinessObject child) |
Override this method to be notified when a child object's Core.BusinessBase.ApplyEdit method has completed. More... | |
override void | OnGetState (Csla.Serialization.Mobile.SerializationInfo info, StateMode mode) |
Override this method to insert your field values into the MobileFormatter serialzation stream. More... | |
override void | OnSetState (Csla.Serialization.Mobile.SerializationInfo info, StateMode mode) |
Override this method to retrieve your field values from the MobileFormatter serialzation stream. More... | |
override void | OnGetChildren (Csla.Serialization.Mobile.SerializationInfo info, Csla.Serialization.Mobile.MobileFormatter formatter) |
Override this method to insert your child object references into the MobileFormatter serialzation stream. More... | |
override void | OnSetChildren (Csla.Serialization.Mobile.SerializationInfo info, Csla.Serialization.Mobile.MobileFormatter formatter) |
Override this method to retrieve your child object references from the MobileFormatter serialzation stream. More... | |
Protected Member Functions inherited from Csla.Core.UndoableBase | |
UndoableBase () | |
Creates an instance of the object. More... | |
virtual void | CopyingState () |
This method is invoked before the CopyState operation begins. More... | |
virtual void | CopyStateComplete () |
This method is invoked after the CopyState operation is complete. More... | |
virtual void | UndoingChanges () |
This method is invoked after the UndoChanges operation is complete. More... | |
virtual void | AcceptingChanges () |
This method is invoked before the AcceptChanges operation begins. More... | |
override void | OnGetState (SerializationInfo info, StateMode mode) |
Override this method to insert your field values into the MobileFormatter serialzation stream. More... | |
override void | OnSetState (SerializationInfo info, StateMode mode) |
Override this method to retrieve your field values from the MobileFormatter serialzation stream. More... | |
Protected Member Functions inherited from Csla.Core.BindableBase | |
BindableBase () | |
Creates an instance of the object. More... | |
virtual bool | ShouldHandlerSerialize (PropertyChangedEventHandler value) |
Override this method to change the default logic for determining if the event handler should be serialized More... | |
virtual void | OnPropertyChanged (string propertyName) |
Call this method to raise the PropertyChanged event for a specific property. More... | |
virtual void | OnMetaPropertyChanged (string propertyName) |
virtual void | OnPropertyChanged (IPropertyInfo propertyInfo) |
Call this method to raise the PropertyChanged event for a specific property. More... | |
virtual void | OnIsDirtyChanged () |
Call this method to raise the PropertyChanged event for all object properties. More... | |
virtual void | OnUnknownPropertyChanged () |
Call this method to raise the PropertyChanged event for all object properties. More... | |
virtual void | OnIsDirtyChanging () |
Call this method to raise the PropertyChanging event for all object properties. More... | |
virtual void | OnUnknownPropertyChanging () |
Call this method to raise the PropertyChanging event for all object properties. More... | |
virtual void | OnPropertyChanging (string propertyName) |
Call this method to raise the PropertyChanging event for a specific property. More... | |
virtual void | OnPropertyChanging (IPropertyInfo propertyInfo) |
Call this method to raise the PropertyChanging event for a specific property. More... | |
virtual bool | ShouldHandlerSerialize (PropertyChangingEventHandler value) |
Override this method to change the default logic for determining if the event handler should be serialized More... | |
Protected Member Functions inherited from Csla.Core.MobileObject | |
virtual void | OnGetChildren (SerializationInfo info, MobileFormatter formatter) |
Override this method to insert your child object references into the MobileFormatter serialzation stream. More... | |
virtual void | OnSetChildren (SerializationInfo info, MobileFormatter formatter) |
Override this method to retrieve your child object references from the MobileFormatter serialzation stream. More... | |
Static Protected Member Functions | |
static Csla.Core.IMemberInfo | RegisterMethod (Type objectType, IMemberInfo info) |
Indicates that the specified method belongs to the type. More... | |
static MethodInfo | RegisterMethod (Type objectType, string methodName) |
Indicates that the specified method belongs to the type. More... | |
static PropertyInfo< P > | RegisterProperty< P > (Type objectType, PropertyInfo< P > info) |
Indicates that the specified property belongs to the type. More... | |
Properties | |
Core.IParent | Parent [get] |
Provide access to the parent reference for use in child object code. More... | |
bool | IsNew [get] |
Returns true if this is a new object, false if it is a pre-existing object. More... | |
bool | IsDeleted [get] |
Returns true if this object is marked for deletion. More... | |
virtual bool | IsDirty [get] |
Returns true if this object's data, or any of its fields or child objects data, has been changed. More... | |
virtual bool | IsSelfDirty [get] |
Returns true if this object's data has been changed. More... | |
virtual bool | IsSavable [get] |
Returns true if this object is both dirty and valid. More... | |
bool | DisableIEditableObject [getset] |
Gets or sets a value indicating whether the IEditableObject interface methods should be disabled for this object. More... | |
bool | IsChild [get] |
Returns true if this is a child (non-root) object. More... | |
EventHandler | ValidationComplete |
Event raised when validation is complete. More... | |
BusinessRules | BusinessRules [get] |
Provides access to the broken rules functionality. More... | |
virtual bool | IsValid [get] |
Returns true if the object and its child objects are currently valid, false if the object or any of its child objects have broken rules or are otherwise invalid. More... | |
virtual bool | IsSelfValid [get] |
Returns true if the object is currently valid, false if the object has broken rules or is otherwise invalid. More... | |
virtual Rules.BrokenRulesCollection | BrokenRulesCollection [get] |
Provides access to the readonly collection of broken business rules for this object. More... | |
virtual bool | IsBusy [get] |
Gets a value indicating if this object or its child objects are busy. More... | |
virtual bool | IsSelfBusy [get] |
Gets a value indicating if this object is busy. More... | |
BusyChangedEventHandler | BusyChanged |
Event indicating that the IsBusy property has changed. More... | |
EventHandler< ErrorEventArgs > | UnhandledAsyncException |
Event indicating that an exception occurred during the processing of an async operation. More... | |
EventHandler< Csla.Core.ChildChangedEventArgs > | ChildChanged |
Event raised when a child object has been changed. More... | |
FieldDataManager | FieldManager [get] |
Gets the PropertyManager object for this business object. More... | |
Properties inherited from Csla.Core.UndoableBase | |
bool | BindingEdit [getset] |
Gets or sets a value indicating whether n-level undo was invoked through IEditableObject. More... | |
int | EditLevel [get] |
Returns the current edit level of the object. More... | |
Properties inherited from Csla.Core.BindableBase | |
PropertyChangedEventHandler | PropertyChanged |
Implements a serialization-safe PropertyChanged event. More... | |
PropertyChangingEventHandler | PropertyChanging |
Implements a serialization-safe PropertyChanging event. More... | |
Properties inherited from Csla.Core.IUndoableObject | |
int | EditLevel [get] |
Gets the current edit level of the object. More... | |
Properties inherited from Csla.Core.IEditableBusinessObject | |
int | EditLevelAdded [getset] |
For internal use only!! More... | |
Properties inherited from Csla.Core.IBusinessObject | |
int | Identity [get] |
Gets a value representing this object instance's unique identity value within the business object graph. More... | |
Properties inherited from Csla.Core.ITrackStatus | |
bool | IsValid [get] |
Returns true if the object and its child objects are currently valid, false if the object or any of its child objects have broken rules or are otherwise invalid. More... | |
bool | IsSelfValid [get] |
Returns true if the object is currently valid, false if the object has broken rules or is otherwise invalid. More... | |
bool | IsDirty [get] |
Returns true if this object's data, or any of its fields or child objects data, has been changed. More... | |
bool | IsSelfDirty [get] |
Returns true if this object's data has been changed. More... | |
bool | IsDeleted [get] |
Returns true if this object is marked for deletion. More... | |
bool | IsNew [get] |
Returns true if this is a new object, false if it is a pre-existing object. More... | |
bool | IsSavable [get] |
Returns true if this object is both dirty and valid. More... | |
bool | IsChild [get] |
Returns true if this is a child object, false if it is a root object. More... | |
Properties inherited from Csla.Core.INotifyBusy | |
bool | IsBusy [get] |
Gets a value indicating whether the object, or any of the object's child objects, are busy running an asynchronous operation. More... | |
bool | IsSelfBusy [get] |
Gets a value indicating whether the object is busy running an asynchronous operation. More... | |
Properties inherited from Csla.Core.IParent | |
IParent | Parent [get] |
Provide access to the parent reference for use in child object code. More... | |
Additional Inherited Members | |
Events inherited from Csla.Core.INotifyBusy | |
BusyChangedEventHandler | BusyChanged |
Event raised when the object's busy status changes. More... | |
Events inherited from Csla.Core.INotifyUnhandledAsyncException | |
EventHandler< ErrorEventArgs > | UnhandledAsyncException |
Event indicating that an exception occurred during an asynchronous operation. More... | |
Events inherited from Csla.Core.INotifyChildChanged | |
EventHandler< ChildChangedEventArgs > | ChildChanged |
Event indictating that a child object has changed. More... | |
This is the non-generic base class from which most business objects will be derived.
Definition at line 40 of file Csla/Core/BusinessBase.cs.
|
protected |
Creates an instance of the object.
Definition at line 59 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Notifies the parent object (if any) that this child object's edits have been accepted.
Reimplemented from Csla.Core.UndoableBase.
Definition at line 908 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Override this method in your business class to be notified when you need to set up shared business rules.
This method is automatically called by CSLA .NET when your object should associate per-type validation rules with its properties.
Definition at line 1165 of file Csla/Core/BusinessBase.cs.
|
protected |
For internal use.
child | Child object. |
Definition at line 1379 of file Csla/Core/BusinessBase.cs.
void Csla.Core.BusinessBase.ApplyEdit | ( | ) |
Commits the current edit process.
Calling this method causes the most recently taken snapshot of the object's state to be discarded, thus committing any changes made to the object's state since the last BeginEdit call.
Implements Csla.Core.ISupportUndo.
Definition at line 896 of file Csla/Core/BusinessBase.cs.
void Csla.Core.BusinessBase.BeginEdit | ( | ) |
Starts a nested edit on the object.
When this method is called the object takes a snapshot of its current state (the values of its variables). This snapshot can be restored by calling CancelEdit or committed by calling ApplyEdit.
This is a nested operation. Each call to BeginEdit adds a new snapshot of the object's state to a stack. You should ensure that for each call to BeginEdit there is a corresponding call to either CancelEdit or ApplyEdit to remove that snapshot from the stack.
See Chapters 2 and 3 for details on n-level undo and state stacking.
Implements Csla.Core.ISupportUndo.
Definition at line 853 of file Csla/Core/BusinessBase.cs.
void Csla.Core.BusinessBase.CancelEdit | ( | ) |
Cancels the current edit process, restoring the object's state to its previous values.
Calling this method causes the most recently taken snapshot of the object's state to be restored. This resets the object's values to the point of the last BeginEdit call.
Implements Csla.Core.ISupportUndo.
Definition at line 867 of file Csla/Core/BusinessBase.cs.
|
virtual |
Returns true if the user is allowed to execute the specified method.
method | Method to execute. |
Definition at line 664 of file Csla/Core/BusinessBase.cs.
bool Csla.Core.BusinessBase.CanExecuteMethod | ( | Csla.Core.IMemberInfo | method, |
bool | throwOnFalse | ||
) |
Returns true if the user is allowed to execute the specified method.
method | Method to execute. |
throwOnFalse | Indicates whether a negative result should cause an exception. |
Definition at line 691 of file Csla/Core/BusinessBase.cs.
|
virtual |
Returns true if the user is allowed to execute the specified method.
methodName | Name of the method to execute. |
Implements Csla.Security.IAuthorizeReadWrite.
Definition at line 713 of file Csla/Core/BusinessBase.cs.
|
virtual |
Returns true if the user is allowed to read the calling property.
property | Property to check. |
Definition at line 496 of file Csla/Core/BusinessBase.cs.
bool Csla.Core.BusinessBase.CanReadProperty | ( | Csla.Core.IPropertyInfo | property, |
bool | throwOnFalse | ||
) |
Returns true if the user is allowed to read the calling property.
property | Property to read. |
throwOnFalse | Indicates whether a negative result should cause an exception. |
Definition at line 523 of file Csla/Core/BusinessBase.cs.
bool Csla.Core.BusinessBase.CanReadProperty | ( | string | propertyName | ) |
Returns true if the user is allowed to read the specified property.
propertyName | Name of the property to read. |
Implements Csla.Security.IAuthorizeReadWrite.
Definition at line 542 of file Csla/Core/BusinessBase.cs.
|
virtual |
Returns true if the user is allowed to write the specified property.
property | Property to write. |
Definition at line 571 of file Csla/Core/BusinessBase.cs.
bool Csla.Core.BusinessBase.CanWriteProperty | ( | Csla.Core.IPropertyInfo | property, |
bool | throwOnFalse | ||
) |
Returns true if the user is allowed to write the calling property.
property | Property to write. |
throwOnFalse | Indicates whether a negative result should cause an exception. |
Definition at line 598 of file Csla/Core/BusinessBase.cs.
bool Csla.Core.BusinessBase.CanWriteProperty | ( | string | propertyName | ) |
Returns true if the user is allowed to write the specified property.
propertyName | Name of the property to write. |
Implements Csla.Security.IAuthorizeReadWrite.
Definition at line 616 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Check object rules and notifies UI of properties that may have changed.
Definition at line 411 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Check rules for the property and notifies UI of properties that may have changed.
property | The property. |
Definition at line 398 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Override this method to load a new business object with default values from the database.
Normally you will overload this method to accept a strongly-typed criteria parameter, rather than overriding the method with a loosely-typed criteria parameter.
Definition at line 1275 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Called by the server-side DataPortal if an exception occurs during data access.
e | The DataPortalContext object passed to the DataPortal. |
ex | The Exception thrown during data access. |
Definition at line 1305 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Called by the server-side DataPortal prior to calling the requested DataPortal_XYZ method.
e | The DataPortalContext object passed to the DataPortal. |
Definition at line 1286 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Called by the server-side DataPortal after calling the requested DataPortal_XYZ method.
e | The DataPortalContext object passed to the DataPortal. |
Definition at line 1295 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Called by the server-side DataPortal if an exception occurs during data access.
e | The DataPortalContext object passed to the DataPortal. |
ex | The Exception thrown during data access. |
Definition at line 1263 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Called by the server-side DataPortal prior to calling the requested DataPortal_XYZ method.
e | The DataPortalContext object passed to the DataPortal. |
Definition at line 1244 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Called by the server-side DataPortal after calling the requested DataPortal_XYZ method.
e | The DataPortalContext object passed to the DataPortal. |
Definition at line 1253 of file Csla/Core/BusinessBase.cs.
|
virtual |
Marks the object for deletion.
The object will be deleted as part of the next save operation.
CSLA .NET supports both immediate and deferred deletion of objects. This method is part of the support for deferred deletion, where an object can be marked for deletion, but isn't actually deleted until the object is saved to the database. This method is called by the UI developer to mark the object for deletion.
To 'undelete' an object, use n-level undo as discussed in Chapters 2 and 3.
Implements Csla.Core.IEditableBusinessObject.
Definition at line 964 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Override this method to be notified when a child object's Core.BusinessBase.ApplyEdit method has completed.
child | The child object that was edited. |
Definition at line 3336 of file Csla/Core/BusinessBase.cs.
BrokenRulesCollection Csla.Core.BusinessBase.GetBrokenRules | ( | ) |
Gets the broken rules for this object
Implements Csla.Core.ICheckRules.
Definition at line 3735 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Creates a clone of the object.
Definition at line 1033 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value as a specified type.
propertyInfo | PropertyInfo object containing property metadata. |
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1825 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's managed field value, first checking authorization.
P | Type of the property. |
propertyInfo | PropertyInfo object containing property metadata. |
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1854 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's managed field value, first checking authorization.
P | Type of the property. |
propertyInfo | PropertyInfo object containing property metadata. |
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1734 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value, first checking authorization.
P | Type of the property. |
field | The backing field for the property. |
propertyInfo | PropertyInfo object containing property metadata. |
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1643 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value, first checking authorization.
P | Type of the property. |
field | The backing field for the property. |
propertyInfo | PropertyInfo object containing property metadata. |
defaultValue | Value to be returned if the user is not authorized to read the property. |
noAccess | True if an exception should be thrown when the user is not authorized to read this property. |
Definition at line 1664 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value as a specified type, first checking authorization.
P | Type of the property. |
propertyInfo | PropertyInfo object containing property metadata. |
noAccess | True if an exception should be thrown when the user is not authorized to read this property. |
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1805 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value, first checking authorization.
P | Type of the property. |
field | The backing field for the property. |
propertyName | The name of the property. |
defaultValue | Value to be returned if the user is not authorized to read the property. |
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1590 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value, first checking authorization.
P | Type of the property. |
field | The backing field for the property. |
propertyName | The name of the property. |
defaultValue | Value to be returned if the user is not authorized to read the property. |
noAccess | True if an exception should be thrown when the user is not authorized to read this property. |
Definition at line 1611 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value from the list of managed field values, first checking authorization, and converting the value to an appropriate type.
F | Type of the field. |
P | Type of the property. |
propertyInfo | PropertyInfo object containing property metadata. |
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1757 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value as a specified type, first checking authorization.
F | Type of the field. |
P | Type of the property. |
field | The backing field for the property. |
propertyInfo | PropertyInfo object containing property metadata. |
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1688 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value as a specified type, first checking authorization.
F | Type of the field. |
P | Type of the property. |
field | The backing field for the property. |
propertyInfo | PropertyInfo object containing property metadata. |
noAccess | True if an exception should be thrown when the user is not authorized to read this property. |
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1715 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value from the list of managed field values, first checking authorization, and converting the value to an appropriate type.
F | Type of the field. |
P | Type of the property. |
propertyInfo | PropertyInfo object containing property metadata. |
noAccess | True if an exception should be thrown when the user is not authorized to read this property. |
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1783 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets the registered rules.
Only for unit testing and not visible to code.
Definition at line 1120 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Override this method to set up event handlers so user code in a partial class can respond to events raised by generated code.
Definition at line 73 of file Csla/Core/BusinessBase.cs.
|
virtual |
Gets a value indicating whether a specific property is busy (has a currently executing async rule).
property | Property to check. |
Definition at line 3096 of file Csla/Core/BusinessBase.cs.
bool Csla.Core.BusinessBase.IsPropertyBusy | ( | string | propertyName | ) |
Gets a value indicating whether a specific property is busy (has a currently executing async rule).
propertyName | Name of the property. |
Definition at line 3109 of file Csla/Core/BusinessBase.cs.
|
protected |
Lazily initializes a property and returns the resulting value.
P | Type of the property. |
property | PropertyInfo object containing property metadata. |
valueGenerator | Method returning the new value. |
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1872 of file Csla/Core/BusinessBase.cs.
|
protected |
Lazily initializes a property and returns the resulting value.
P | Type of the property. |
property | PropertyInfo object containing property metadata. |
factory | Async method returning the new value. |
Note that the first value returned is almost certainly the defaultValue because the value is initialized asynchronously. The real value is provided later along with a PropertyChanged event to indicate the value has changed.
If the user is not authorized to read the property value, the defaultValue value is returned as a result.
Definition at line 1906 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value as a specified type.
P | Type of the property. |
property | PropertyInfo object containing property metadata. |
valueGenerator | Method returning the new value. |
Definition at line 2021 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value as a specified type.
P | Type of the property. |
property | PropertyInfo object containing property metadata. |
factory | Async method returning the new value. |
Definition at line 2040 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Loads a property's managed field with the supplied value.
propertyInfo | PropertyInfo object containing property metadata. |
newValue | The 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 2853 of file Csla/Core/BusinessBase.cs.
|
protected |
Loads a property's managed field with the supplied value.
P | Type of the property. |
propertyInfo | PropertyInfo object containing property metadata. |
newValue | The 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 2570 of file Csla/Core/BusinessBase.cs.
|
protected |
Load a property from an async method.
R |
property | |
factory |
Definition at line 3000 of file Csla/Core/BusinessBase.cs.
|
protected |
Loads a property's managed field with the supplied value.
propertyInfo | PropertyInfo object containing property metadata. |
newValue | The 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 2515 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Loads a property's managed field with the supplied value.
propertyInfo | PropertyInfo object containing property metadata. |
newValue | The 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 2770 of file Csla/Core/BusinessBase.cs.
|
protected |
Loads a property's managed field with the supplied value and mark field as dirty if value is modified.
P | Type of the property. |
propertyInfo | PropertyInfo object containing property metadata. |
newValue | The 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 2615 of file Csla/Core/BusinessBase.cs.
|
protected |
Marks the object as being a child object.
Definition at line 939 of file Csla/Core/BusinessBase.cs.
|
protected |
Mark the object as busy (it is running an async operation).
Definition at line 3018 of file Csla/Core/BusinessBase.cs.
|
protected |
Forces the object's IsDirty flag to false.
This method is normally called automatically and is not intended to be called manually.
Definition at line 433 of file Csla/Core/BusinessBase.cs.
|
protected |
Marks an object for deletion.
This also marks the object as being dirty.
You should call this method in your business logic in the case that you want to have the object deleted when it is saved to the database.
Definition at line 309 of file Csla/Core/BusinessBase.cs.
|
protected |
Marks an object as being dirty, or changed.
You should call this method in your business logic any time the object's internal data changes. Any time any instance variable changes within the object, this method should be called to tell CSLA .NET that the object's data has been changed.
Marking an object as dirty does two things. First it ensures that CSLA .NET will properly save the object as appropriate. Second, it causes CSLA .NET to tell Windows Forms data binding that the object's data has changed so any bound controls will update to reflect the new values.
Definition at line 333 of file Csla/Core/BusinessBase.cs.
|
protected |
Marks an object as being dirty, or changed.
suppressEvent | true to supress the PropertyChanged event that is otherwise raised to indicate that the object's state has changed. |
Definition at line 346 of file Csla/Core/BusinessBase.cs.
|
protected |
Mark the object as not busy (it is not running an async operation).
Definition at line 3032 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Marks the object as being a new object.
This also marks the object as being dirty and ensures that it is not marked for deletion.
Newly created objects are marked new by default. You should call this method in the implementation of DataPortal_Update when the object is deleted (due to being marked for deletion) to indicate that the object no longer reflects data in the database.
If you override this method, make sure to call the base implementation after executing your new code.
Definition at line 266 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Marks the object as being an old (not new) object.
This also marks the object as being unchanged (not dirty).
You should call this method in the implementation of DataPortal_Fetch to indicate that an existing object has been successfully retrieved from the database.
You should call this method in the implementation of DataPortal_Update to indicate that a new object has been successfully inserted into the database.
If you override this method, make sure to call the base implementation after executing your new code.
Definition at line 293 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Raises OnPropertyChanged for meta properties (IsXYZ) when PropertyChangedMode is not Windows
name | meta property name that has cchanged. |
Definition at line 387 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Hook child object events.
child | Child object. |
Definition at line 1389 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Raise the BusyChanged event.
args | Event args. |
Definition at line 3080 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Raises the ChildChanged event, indicating that a child object has been changed.
e | ChildChangedEventArgs object. |
Definition at line 3190 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
This method is called on a newly deserialized object after deserialization is complete.
context | Serialization context object. |
Definition at line 1367 of file Csla/Core/BusinessBase.cs.
|
protected |
Override this method to insert your child object references into the MobileFormatter serialzation stream.
info | Object containing the data to serialize. |
formatter | Reference to MobileFormatter instance. Use this to convert child references to/from reference id values. |
Definition at line 3525 of file Csla/Core/BusinessBase.cs.
|
protected |
Override this method to insert your field values into the MobileFormatter serialzation stream.
info | Object containing the data to serialize. |
mode | The StateMode indicating why this method was invoked. |
Definition at line 3475 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Unhook child object events.
child | Child object. |
Definition at line 1431 of file Csla/Core/BusinessBase.cs.
|
protected |
Override this method to retrieve your child object references from the MobileFormatter serialzation stream.
info | Object containing the data to serialize. |
formatter | Reference to MobileFormatter instance. Use this to convert child references to/from reference id values. |
Definition at line 3555 of file Csla/Core/BusinessBase.cs.
|
protected |
Override this method to retrieve your field values from the MobileFormatter serialzation stream.
info | Object containing the data to serialize. |
mode | The StateMode indicating why this method was invoked. |
Definition at line 3499 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Raises the UnhandledAsyncException event.
error | Args parameter. |
Definition at line 3137 of file Csla/Core/BusinessBase.cs.
|
protected |
Raises the UnhandledAsyncException event.
originalSender | Original sender of the event. |
error | Exception object. |
Definition at line 3150 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Raises the ValidationComplete event
Definition at line 1067 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Performs processing required when a property has changed.
property | Property that has changed. |
This method calls CheckRules(propertyName), MarkDirty and OnPropertyChanged(propertyName). MarkDirty is called such that no event is raised for IsDirty, so only the specific property changed event for the current property is raised.
Definition at line 372 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Gets a property's value.
propertyInfo | PropertyInfo object containing property metadata. |
Definition at line 1984 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value as a specified type.
P | Type of the property. |
propertyInfo | PropertyInfo object containing property metadata. |
Definition at line 1956 of file Csla/Core/BusinessBase.cs.
|
protected |
Gets a property's value from the list of managed field values, converting the value to an appropriate type.
F | Type of the field. |
P | Type of the property. |
propertyInfo | PropertyInfo object containing property metadata. |
Definition at line 1943 of file Csla/Core/BusinessBase.cs.
|
staticprotected |
Indicates that the specified method belongs to the type.
objectType | Type of object to which the method belongs. |
info | IMemberInfo object for the property. |
Definition at line 1515 of file Csla/Core/BusinessBase.cs.
|
staticprotected |
Indicates that the specified method belongs to the type.
objectType | Type of object to which the method belongs. |
methodName | Name of the method. |
Definition at line 1536 of file Csla/Core/BusinessBase.cs.
|
staticprotected |
Indicates that the specified property belongs to the type.
P | Type of property. |
objectType | Type of object to which the property belongs. |
info | PropertyInfo object for the property. |
Definition at line 1563 of file Csla/Core/BusinessBase.cs.
|
protected |
For internal use only.
child | Child object. |
Definition at line 1421 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Used by BusinessListBase as a child object is created to tell the child object about its parent.
parent | A reference to the parent collection object. |
Definition at line 140 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's managed field with the supplied value, and then calls PropertyHasChanged if the value does change.
propertyInfo | PropertyInfo object containing property metadata. |
newValue | The new value for the property. |
If the user is not authorized to change the property a SecurityException is thrown.
Definition at line 2450 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's managed field with the supplied value, and then calls PropertyHasChanged if the value does change.
P | Type of the property. |
propertyInfo | PropertyInfo object containing property metadata. |
newValue | The new value for the property. |
If the user is not authorized to change the property a SecurityException is thrown.
Definition at line 2492 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's managed field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change.
P | Property type. |
propertyInfo | PropertyInfo object containing property metadata. |
newValue | The new value for the property. |
If the user is not authorized to change the property, this overload throws a SecurityException.
Definition at line 2313 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's managed field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change.
P | Type of the property. |
propertyInfo | PropertyInfo object containing property metadata. |
newValue | The new value for the property. |
noAccess | True if an exception should be thrown when the user is not authorized to change this property. |
Definition at line 2404 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change.
field | A reference to the backing field for the property. |
newValue | The new value for the property. |
propertyInfo | PropertyInfo object containing property metadata. |
If the user is not authorized to change the property, this overload throws a SecurityException.
Definition at line 2079 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change.
field | A reference to the backing field for the property. |
newValue | The new value for the property. |
propertyName | The name of the property. |
If the user is not authorized to change the property, this overload throws a SecurityException.
Definition at line 2099 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change.
field | A reference to the backing field for the property. |
newValue | The new value for the property. |
propertyName | The name of the property. |
noAccess | True if an exception should be thrown when the user is not authorized to change this property. |
Definition at line 2173 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's managed field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change.
propertyInfo | PropertyInfo object containing property metadata. |
newValue | The new value for the property. |
If the user is not authorized to change the property, this overload throws a SecurityException.
Definition at line 2331 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's managed field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change.
propertyInfo | PropertyInfo object containing property metadata. |
newValue | The new value for the property. |
noAccess | True if an exception should be thrown when the user is not authorized to change this property. |
Definition at line 2348 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change.
P | Type of the field being set. |
V | Type of the value provided to the field. |
field | A reference to the backing field for the property. |
newValue | The new value for the property. |
propertyInfo | PropertyInfo object containing property metadata. |
If the user is not authorized to change the property, this overload throws a SecurityException.
Definition at line 2125 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change.
P | Type of the field being set. |
V | Type of the value provided to the field. |
field | A reference to the backing field for the property. |
newValue | The new value for the property. |
propertyInfo | PropertyInfo object containing property metadata. |
noAccess | True if an exception should be thrown when the user is not authorized to change this property. |
If the field value is of type string, any incoming null values are converted to string.Empty.
Definition at line 2154 of file Csla/Core/BusinessBase.cs.
|
protected |
Sets a property's backing field with the supplied value, first checking authorization, and then calling PropertyHasChanged if the value does change.
P | Type of the field being set. |
V | Type of the value provided to the field. |
field | A reference to the backing field for the property. |
newValue | The new value for the property. |
propertyName | The name of the property. |
noAccess | True if an exception should be thrown when the user is not authorized to change this property. |
If the field value is of type string, any incoming null values are converted to string.Empty.
Definition at line 2248 of file Csla/Core/BusinessBase.cs.
|
protectedvirtual |
Called when an undo operation has completed.
This method resets the object as a result of deserialization and raises PropertyChanged events to notify data binding that the object has changed.
Reimplemented from Csla.Core.UndoableBase.
Definition at line 880 of file Csla/Core/BusinessBase.cs.
|
get |
Provides access to the readonly collection of broken business rules for this object.
Definition at line 1229 of file Csla/Core/BusinessBase.cs.
|
getprotected |
Provides access to the broken rules functionality.
This property is used within your business logic so you can easily call the AddRule() method to associate business rules with your object's properties.
Definition at line 1103 of file Csla/Core/BusinessBase.cs.
|
addremove |
Event indicating that the IsBusy property has changed.
Definition at line 3070 of file Csla/Core/BusinessBase.cs.
|
addremove |
Event raised when a child object has been changed.
Definition at line 3168 of file Csla/Core/BusinessBase.cs.
|
getsetprotected |
Gets or sets a value indicating whether the IEditableObject interface methods should be disabled for this object.
Defaults to False, indicating that the IEditableObject methods will behave normally.
If you disable the IEditableObject methods then Windows Forms data binding will no longer automatically call BeginEdit, CancelEdit or ApplyEdit on your object, and you will have to call these methods manually to get proper n-level undo behavior.
Definition at line 755 of file Csla/Core/BusinessBase.cs.
|
getprotected |
Gets the PropertyManager object for this business object.
Definition at line 3294 of file Csla/Core/BusinessBase.cs.
|
get |
Gets a value indicating if this object or its child objects are busy.
Definition at line 3046 of file Csla/Core/BusinessBase.cs.
|
get |
Returns true if this is a child (non-root) object.
Definition at line 931 of file Csla/Core/BusinessBase.cs.
|
get |
Returns true if this object is marked for deletion.
CSLA .NET supports both immediate and deferred deletion of objects. This property is part of the support for deferred deletion, where an object can be marked for deletion, but isn't actually deleted until the object is saved to the database. This property indicates whether or not the current object has been marked for deletion. If it is true , the object will be deleted when it is saved to the database, otherwise it will be inserted or updated by the save operation.
Definition at line 194 of file Csla/Core/BusinessBase.cs.
|
get |
Returns true if this object's data, or any of its fields or child objects data, has been changed.
When an object's data is changed, CSLA .NET makes note of that change and considers the object to be 'dirty' or changed. This value is used to optimize data updates, since an unchanged object does not need to be updated into the database. All new objects are considered dirty. All objects marked for deletion are considered dirty.
Once an object's data has been saved to the database (inserted or updated) the dirty flag is cleared and the object is considered unchanged. Objects newly loaded from the database are also considered unchanged.
Definition at line 221 of file Csla/Core/BusinessBase.cs.
|
get |
Returns true if this is a new object, false if it is a pre-existing object.
An object is considered to be new if its primary identifying (key) value doesn't correspond to data in the database. In other words, if the data values in this particular object have not yet been saved to the database the object is considered to be new. Likewise, if the object's data has been deleted from the database then the object is considered to be new.
Definition at line 172 of file Csla/Core/BusinessBase.cs.
|
get |
Returns true if this object is both dirty and valid.
An object is considered dirty (changed) if P:Csla.BusinessBase.IsDirty returns true. It is considered valid if IsValid returns true. The IsSavable property is a combination of these two properties.
Definition at line 458 of file Csla/Core/BusinessBase.cs.
|
get |
Gets a value indicating if this object is busy.
Definition at line 3058 of file Csla/Core/BusinessBase.cs.
|
get |
Returns true if this object's data has been changed.
When an object's data is changed, CSLA .NET makes note of that change and considers the object to be 'dirty' or changed. This value is used to optimize data updates, since an unchanged object does not need to be updated into the database. All new objects are considered dirty. All objects marked for deletion are considered dirty.
Once an object's data has been saved to the database (inserted or updated) the dirty flag is cleared and the object is considered unchanged. Objects newly loaded from the database are also considered unchanged.
Definition at line 246 of file Csla/Core/BusinessBase.cs.
|
get |
Returns true if the object is currently valid, false if the object has broken rules or is otherwise invalid.
By default this property relies on the underling BusinessRules object to track whether any business rules are currently broken for this object.
You can override this property to provide more sophisticated implementations of the behavior.
Definition at line 1215 of file Csla/Core/BusinessBase.cs.
|
get |
Returns true if the object and its child objects are currently valid, false if the object or any of its child objects have broken rules or are otherwise invalid.
By default this property relies on the underling BusinessRules object to track whether any business rules are currently broken for this object.
You can override this property to provide more sophisticated implementations of the behavior. For instance, you should always override this method if your object has child objects, since the validity of this object is affected by the validity of all child objects.
Definition at line 1192 of file Csla/Core/BusinessBase.cs.
|
get |
Provide access to the parent reference for use in child object code.
This value will be Nothing for root objects.
Definition at line 129 of file Csla/Core/BusinessBase.cs.
|
addremove |
Event indicating that an exception occurred during the processing of an async operation.
Definition at line 3126 of file Csla/Core/BusinessBase.cs.
|
addremove |
Event raised when validation is complete.
Definition at line 1049 of file Csla/Core/BusinessBase.cs.