CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.CommandBase< T > Class Template Referenceabstract

This is the base class from which command objects will be derived. More...

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

Public Member Functions

 CommandBase ()
 Creates an instance of the type.
Clone ()
 Creates a clone of the object.

Protected Member Functions

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.
virtual void DataPortal_OnDataPortalInvoke (DataPortalEventArgs e)
 Called by the server-side DataPortal prior to calling the requested DataPortal_xyz method.
virtual void DataPortal_OnDataPortalInvokeComplete (DataPortalEventArgs e)
 Called by the server-side DataPortal after calling the requested DataPortal_xyz method.
virtual void DataPortal_OnDataPortalException (DataPortalEventArgs e, Exception ex)
 Called by the server-side DataPortal if an exception occurs during server-side processing.
virtual object GetClone ()
 Creates a clone of the object.
Protected Member Functions inherited from Csla.Core.ManagedObjectBase
P? ReadPropertyConvert<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] F, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< F > propertyInfo)
 Gets a property's value from the list of managed field values, converting the value to an appropriate type.
P? ReadProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > propertyInfo)
 Gets a property's value as a specified type.
void LoadPropertyConvert<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] F > (PropertyInfo< P > propertyInfo, F? newValue)
 Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change.
void LoadProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > propertyInfo, P? newValue)
 Loads a property's managed field with the supplied value calling PropertyHasChanged if the value does change.
void OnPropertyChanged (string propertyName)
 Raises the PropertyChanged event.
void OnPropertyChanged (IPropertyInfo propertyInfo)
 Raises the PropertyChanged event.
override void OnGetChildren (SerializationInfo info, MobileFormatter formatter)
 Override this method to manually retrieve child object data from the serializations stream.
override void OnSetChildren (SerializationInfo info, MobileFormatter formatter)
 Override this method to manually serialize child objects into the serialization stream.
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 serialization stream.
virtual void OnSetState (SerializationInfo info, StateMode mode)
 Override this method to retrieve your field values from the MobileFormatter serialization stream.
virtual void OnGetMetastate (BinaryWriter writer)
 Override this method to write field values directly to a binary stream for metastate serialization.
virtual void OnSetMetastate (BinaryReader reader)
 Override this method to read field values directly from a binary stream for metastate deserialization.

Static Protected Member Functions

static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (PropertyInfo< P > info)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (string? propertyName)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (string? propertyName, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (string? propertyName, string? friendlyName)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression, string? friendlyName)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (string propertyName, string? friendlyName, P defaultValue)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression, string? friendlyName, P defaultValue)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (string propertyName, string? friendlyName, P defaultValue, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression, string? friendlyName, P defaultValue, RelationshipTypes relationship)
 Indicates that the specified property belongs to the business object type.
Static Protected Member Functions inherited from Csla.Core.ManagedObjectBase
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type objectType, PropertyInfo< P > info)
 Indicates that the specified property belongs to the type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression, P? defaultValue)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression, string? friendlyName)
 Indicates that the specified property belongs to the business object type.
static PropertyInfo< P > RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T, [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > (Expression< Func< T, object > > propertyLambdaExpression, string friendlyName, P? defaultValue)
 Indicates that the specified property belongs to the business object type.

Additional Inherited Members

Properties inherited from Csla.Core.ManagedObjectBase
ApplicationContext ApplicationContext = default! [get]
 Gets the current ApplicationContext.
FieldDataManager FieldManager [get]
 Gets a reference to the field manager for this object.

Detailed Description

This is the base class from which command objects will be derived.

Command objects allow the execution of arbitrary server-side functionality. Most often, this involves the invocation of a stored procedure in the database, but can involve any other type of stateless, atomic call to the server instead.

To implement a command object, inherit from CommandBase and override the DataPortal_Execute method. In this method you can implement any server-side code as required.

To pass data to/from the server, use instance variables within the command object itself. The command object is instantiated on the client, and is passed by value to the server where the DataPortal_Execute method is invoked. The command object is then returned to the client by value.

Type Constraints
T :CommandBase<T> 

Member Function Documentation

◆ Clone()

T Csla.CommandBase< T >.Clone ( )
inline

Creates a clone of the object.

Returns
A new object containing the exact data of the original object.

◆ CommandBase()

Csla.CommandBase< T >.CommandBase ( )
inline

Creates an instance of the type.

◆ DataPortal_OnDataPortalException()

virtual void Csla.CommandBase< T >.DataPortal_OnDataPortalException ( DataPortalEventArgs e,
Exception ex )
inlineprotectedvirtual

Called by the server-side DataPortal if an exception occurs during server-side processing.

Parameters
eThe DataPortalContext object passed to the DataPortal.
exThe Exception thrown during processing.

◆ DataPortal_OnDataPortalInvoke()

virtual void Csla.CommandBase< T >.DataPortal_OnDataPortalInvoke ( DataPortalEventArgs e)
inlineprotectedvirtual

Called by the server-side DataPortal prior to calling the requested DataPortal_xyz method.

Parameters
eThe DataPortalContext object passed to the DataPortal.

◆ DataPortal_OnDataPortalInvokeComplete()

virtual void Csla.CommandBase< T >.DataPortal_OnDataPortalInvokeComplete ( DataPortalEventArgs e)
inlineprotectedvirtual

Called by the server-side DataPortal after calling the requested DataPortal_xyz method.

Parameters
eThe DataPortalContext object passed to the DataPortal.

◆ GetClone()

virtual object Csla.CommandBase< T >.GetClone ( )
inlineprotectedvirtual

Creates a clone of the object.

Returns
A new object containing the exact data of the original object.

◆ Initialize()

virtual void Csla.CommandBase< T >.Initialize ( )
inlineprotectedvirtual

Override this method to set up event handlers so user code in a partial class can respond to events raised by generated code.

◆ RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P >() [1/11]

PropertyInfo< P > Csla.CommandBase< T >.RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ( Expression< Func< T, object > > propertyLambdaExpression)
inlinestaticprotected

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

Template Parameters
PType of property
Parameters
propertyLambdaExpressionProperty Expression
Exceptions
ArgumentNullExceptionpropertyLambdaExpression is null.

◆ RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P >() [2/11]

PropertyInfo< P > Csla.CommandBase< T >.RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ( Expression< Func< T, object > > propertyLambdaExpression,
RelationshipTypes relationship )
inlinestaticprotected

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

Template Parameters
PType of property
Parameters
propertyLambdaExpressionProperty Expression
relationshipRelationship with property value.
Exceptions
ArgumentNullExceptionpropertyLambdaExpression is null.

◆ RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P >() [3/11]

PropertyInfo< P > Csla.CommandBase< T >.RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ( Expression< Func< T, object > > propertyLambdaExpression,
string? friendlyName )
inlinestaticprotected

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

Template Parameters
PType of property
Parameters
propertyLambdaExpressionProperty Expression
friendlyNameFriendly description for a property to be used in databinding
Exceptions
ArgumentNullExceptionpropertyLambdaExpression is null.

◆ RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P >() [4/11]

PropertyInfo< P > Csla.CommandBase< T >.RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ( Expression< Func< T, object > > propertyLambdaExpression,
string? friendlyName,
P defaultValue )
inlinestaticprotected

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

Template Parameters
PType of property
Parameters
propertyLambdaExpressionProperty Expression
friendlyNameFriendly description for a property to be used in databinding
defaultValueDefault Value for the property
Exceptions
ArgumentNullExceptionpropertyLambdaExpression is null.

◆ RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P >() [5/11]

PropertyInfo< P > Csla.CommandBase< T >.RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ( Expression< Func< T, object > > propertyLambdaExpression,
string? friendlyName,
P defaultValue,
RelationshipTypes relationship )
inlinestaticprotected

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

Template Parameters
PType of property
Parameters
propertyLambdaExpressionProperty Expression
friendlyNameFriendly description for a property to be used in databinding
defaultValueDefault Value for the property
relationshipRelationship with property value.
Exceptions
ArgumentNullExceptionpropertyLambdaExpression is null.

◆ RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P >() [6/11]

PropertyInfo< P > Csla.CommandBase< T >.RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ( PropertyInfo< P > info)
inlinestaticprotected

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

Template Parameters
PType of property.
Parameters
infoPropertyInfo object for the property.
Returns
The provided IPropertyInfo object.
Exceptions
ArgumentNullExceptioninfo is null.

◆ RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P >() [7/11]

PropertyInfo< P > Csla.CommandBase< T >.RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ( string propertyName,
string? friendlyName,
P defaultValue )
inlinestaticprotected

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

Template Parameters
PType of property
Parameters
propertyNameProperty name from nameof()
friendlyNameFriendly description for a property to be used in databinding
defaultValueDefault Value for the property
Exceptions
ArgumentNullExceptionpropertyName is null.

◆ RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P >() [8/11]

PropertyInfo< P > Csla.CommandBase< T >.RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ( string propertyName,
string? friendlyName,
P defaultValue,
RelationshipTypes relationship )
inlinestaticprotected

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

Template Parameters
PType of property
Parameters
propertyNameProperty name from nameof()
friendlyNameFriendly description for a property to be used in databinding
defaultValueDefault Value for the property
relationshipRelationship with property value.
Exceptions
ArgumentNullExceptionpropertyName is null.

◆ RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P >() [9/11]

PropertyInfo< P > Csla.CommandBase< T >.RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ( string? propertyName)
inlinestaticprotected

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

Template Parameters
PType of property
Parameters
propertyNameProperty name from nameof()
Exceptions
ArgumentNullExceptionpropertyName is null.

◆ RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P >() [10/11]

PropertyInfo< P > Csla.CommandBase< T >.RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ( string? propertyName,
RelationshipTypes relationship )
inlinestaticprotected

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

Template Parameters
PType of property
Parameters
propertyNameProperty name from nameof()
relationshipRelationship with property value.
Exceptions
ArgumentNullExceptionpropertyName is null.

◆ RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P >() [11/11]

PropertyInfo< P > Csla.CommandBase< T >.RegisterProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] P > ( string? propertyName,
string? friendlyName )
inlinestaticprotected

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

Template Parameters
PType of property
Parameters
propertyNameProperty name from nameof()
friendlyNameFriendly description for a property to be used in databinding
Exceptions
ArgumentNullExceptionpropertyName is null.

The documentation for this class was generated from the following file: