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.
cslalighttest.Serialization.Customer Class Reference

Implementation of a test business object using CSLA managed properties backed by fields, and custom serialization logic (requirement of backing managed properties with fields). More...

Inheritance diagram for cslalighttest.Serialization.Customer:
Csla.BusinessBase< Customer >

Public Member Functions

 Customer ()
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
bool Equals (Customer other)
 
- Public Member Functions inherited from Csla.BusinessBase< Customer >
override string ToString ()
 Returns a text representation of this object by returning the GetIdValue value in text form. More...
 
Clone ()
 Creates a clone of the object. More...
 
Save ()
 Saves the object to the database. More...
 
Save (bool forceUpdate)
 Saves the object to the database, forcing IsNew to false and IsDirty to True. More...
 
async Task< T > SaveAsync ()
 Saves the object to the database. More...
 
async Task< T > SaveAsync (bool forceUpdate)
 Saves the object to the database. More...
 
async Task SaveAndMergeAsync ()
 Saves the object to the database, merging any resulting updates into the existing object graph. More...
 
async Task SaveAndMergeAsync (bool forceUpdate)
 Saves the object to the database, merging any resulting updates into the existing object graph. More...
 

Protected Member Functions

override void OnGetChildren (SerializationInfo info, MobileFormatter formatter)
 
override void OnSetChildren (SerializationInfo info, MobileFormatter formatter)
 
override void OnGetState (SerializationInfo info, StateMode mode)
 
override void OnSetState (SerializationInfo info, StateMode mode)
 
- Protected Member Functions inherited from Csla.BusinessBase< Customer >
virtual object GetIdValue ()
 Override this method to return a unique identifying value for this object. More...
 
virtual async Task< T > SaveAsync (bool forceUpdate, object userState, bool isSync)
 Saves the object to the database. More...
 
virtual void OnSaved (T newObject, Exception e, object userState)
 Raises the Saved event, indicating that the object has been saved, and providing a reference to the new object instance. More...
 

Properties

string Name [getset]
 Gets or sets the name of the customer. More...
 
CustomerContact PrimaryContact [getset]
 Gets or sets the primary customer contact. More...
 
CustomerContact AccountsPayableContact [getset]
 Gets or sets the accounts payable contact for the customer. More...
 
- Properties inherited from Csla.BusinessBase< Customer >
EventHandler< Csla.Core.SavedEventArgsSaved
 Event raised when an object has been saved. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Csla.BusinessBase< Customer >
static PropertyInfo< P > RegisterProperty< P > (PropertyInfo< P > info)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< P > (string propertyName)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< P > (Expression< Func< T, object > > propertyLambdaExpression)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< P > (string propertyName, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< P > (Expression< Func< T, object > > propertyLambdaExpression, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< P > (string propertyName, string friendlyName)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< P > (Expression< Func< T, object > > propertyLambdaExpression, string friendlyName)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< P > (string propertyName, string friendlyName, P defaultValue)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< P > (Expression< Func< T, object > > propertyLambdaExpression, string friendlyName, P defaultValue)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< P > (string propertyName, string friendlyName, P defaultValue, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type. More...
 
static PropertyInfo< P > RegisterProperty< P > (Expression< Func< T, object > > propertyLambdaExpression, string friendlyName, P defaultValue, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type. More...
 
static MethodInfo RegisterMethod (string methodName)
 Registers a method for use in Authorization. More...
 
static MethodInfo RegisterMethod (Expression< Action< T > > methodLambdaExpression)
 Registers a method for use in Authorization. More...
 

Detailed Description

Implementation of a test business object using CSLA managed properties backed by fields, and custom serialization logic (requirement of backing managed properties with fields).

Definition at line 22 of file Silverlight/Serialization/Customer.cs.

Constructor & Destructor Documentation

◆ Customer()

cslalighttest.Serialization.Customer.Customer ( )

Definition at line 26 of file Silverlight/Serialization/Customer.cs.

Member Function Documentation

◆ Equals() [1/2]

bool cslalighttest.Serialization.Customer.Equals ( Customer  other)

Definition at line 56 of file Silverlight/Serialization/Customer.cs.

◆ Equals() [2/2]

override bool cslalighttest.Serialization.Customer.Equals ( object  obj)

Definition at line 36 of file Silverlight/Serialization/Customer.cs.

◆ GetHashCode()

override int cslalighttest.Serialization.Customer.GetHashCode ( )

Definition at line 41 of file Silverlight/Serialization/Customer.cs.

◆ OnGetChildren()

override void cslalighttest.Serialization.Customer.OnGetChildren ( SerializationInfo  info,
MobileFormatter  formatter 
)
protected

Definition at line 74 of file Silverlight/Serialization/Customer.cs.

◆ OnGetState()

override void cslalighttest.Serialization.Customer.OnGetState ( SerializationInfo  info,
StateMode  mode 
)
protected

Definition at line 86 of file Silverlight/Serialization/Customer.cs.

◆ OnSetChildren()

override void cslalighttest.Serialization.Customer.OnSetChildren ( SerializationInfo  info,
MobileFormatter  formatter 
)
protected

Definition at line 80 of file Silverlight/Serialization/Customer.cs.

◆ OnSetState()

override void cslalighttest.Serialization.Customer.OnSetState ( SerializationInfo  info,
StateMode  mode 
)
protected

Definition at line 91 of file Silverlight/Serialization/Customer.cs.

Property Documentation

◆ AccountsPayableContact

CustomerContact cslalighttest.Serialization.Customer.AccountsPayableContact
getset

Gets or sets the accounts payable contact for the customer.

Definition at line 130 of file Silverlight/Serialization/Customer.cs.

◆ Name

string cslalighttest.Serialization.Customer.Name
getset

Gets or sets the name of the customer.

Definition at line 106 of file Silverlight/Serialization/Customer.cs.

◆ PrimaryContact

CustomerContact cslalighttest.Serialization.Customer.PrimaryContact
getset

Gets or sets the primary customer contact.

Definition at line 118 of file Silverlight/Serialization/Customer.cs.