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.DataPortal Class Reference

Implements the server-side DataPortal message router as discussed in Chapter 4. More...

Inheritance diagram for Csla.Server.DataPortal:
Csla.Server.IDataPortalServer

Classes

class  NullAuthorizer
 Default implementation of the authorizer that allows all data portal calls to pass. More...
 

Public Member Functions

 DataPortal ()
 Default constructor More...
 
async Task< DataPortalResultCreate (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Create a new business object. More...
 
async Task< DataPortalResultFetch (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Get an existing business object. More...
 
async Task< DataPortalResultUpdate (object obj, DataPortalContext context, bool isSync)
 Update a business object. More...
 
async Task< DataPortalResultDelete (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Delete a business object. More...
 

Static Public Member Functions

static object GetCriteriaFromArray (params object[] criteria)
 Converts a params array to a single serializable criteria value. More...
 
static object[] GetCriteriaArray (object criteria)
 Converts a single serializable criteria value into an array of type object. More...
 

Protected Member Functions

 DataPortal (string cslaAuthorizationProviderAppSettingName)
 This construcor accepts the App Setting name for the Csla Authorization Provider, therefore getting the provider type from configuration file More...
 
 DataPortal (Type authProviderType)
 This constructor accepts the Authorization Provider Type as a parameter. More...
 

Properties

static Dashboard.IDashboard Dashboard [getset]
 Gets the data portal dashboard instance. More...
 
static Type InterceptorType [getset]
 Gets or sets the type of interceptor invoked by the data portal for pre- and post-processing of each data portal invocation. More...
 
static IAuthorizeDataPortal Authorizer [getset]
 Gets or sets a reference to the current authorizer. More...
 

Detailed Description

Implements the server-side DataPortal message router as discussed in Chapter 4.

Definition at line 21 of file Server/DataPortal.cs.

Constructor & Destructor Documentation

◆ DataPortal() [1/3]

Csla.Server.DataPortal.DataPortal ( )

Default constructor

Definition at line 37 of file Server/DataPortal.cs.

◆ DataPortal() [2/3]

Csla.Server.DataPortal.DataPortal ( string  cslaAuthorizationProviderAppSettingName)
protected

This construcor accepts the App Setting name for the Csla Authorization Provider, therefore getting the provider type from configuration file

Parameters
cslaAuthorizationProviderAppSettingName

Definition at line 48 of file Server/DataPortal.cs.

◆ DataPortal() [3/3]

Csla.Server.DataPortal.DataPortal ( Type  authProviderType)
protected

This constructor accepts the Authorization Provider Type as a parameter.

Parameters
authProviderType

Definition at line 57 of file Server/DataPortal.cs.

Member Function Documentation

◆ Create()

async Task< DataPortalResult > Csla.Server.DataPortal.Create ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)

Create a new business object.

Parameters
objectTypeType of business object to create.
criteriaCriteria object describing business object.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Implements Csla.Server.IDataPortalServer.

Definition at line 138 of file Server/DataPortal.cs.

◆ Delete()

async Task< DataPortalResult > Csla.Server.DataPortal.Delete ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)

Delete a business object.

Parameters
objectTypeType of business object to create.
criteriaCriteria object describing business object.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Implements Csla.Server.IDataPortalServer.

Definition at line 456 of file Server/DataPortal.cs.

◆ Fetch()

async Task< DataPortalResult > Csla.Server.DataPortal.Fetch ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)

Get an existing business object.

Parameters
objectTypeType of business object to retrieve.
criteriaCriteria object describing business object.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Implements Csla.Server.IDataPortalServer.

Definition at line 233 of file Server/DataPortal.cs.

◆ GetCriteriaArray()

static object[] Csla.Server.DataPortal.GetCriteriaArray ( object  criteria)
static

Converts a single serializable criteria value into an array of type object.

Parameters
criteriaSingle serializble criteria value
Returns

Definition at line 755 of file Server/DataPortal.cs.

◆ GetCriteriaFromArray()

static object Csla.Server.DataPortal.GetCriteriaFromArray ( params object[]  criteria)
static

Converts a params array to a single serializable criteria value.

Parameters
criteriaParams array
Returns

Definition at line 730 of file Server/DataPortal.cs.

◆ Update()

async Task< DataPortalResult > Csla.Server.DataPortal.Update ( object  obj,
DataPortalContext  context,
bool  isSync 
)

Update a business object.

Parameters
objBusiness object to update.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Implements Csla.Server.IDataPortalServer.

Definition at line 325 of file Server/DataPortal.cs.

Property Documentation

◆ Authorizer

IAuthorizeDataPortal Csla.Server.DataPortal.Authorizer
staticgetsetprotected

Gets or sets a reference to the current authorizer.

Definition at line 680 of file Server/DataPortal.cs.

◆ Dashboard

Dashboard.IDashboard Csla.Server.DataPortal.Dashboard
staticgetset

Gets the data portal dashboard instance.

Definition at line 26 of file Server/DataPortal.cs.

◆ InterceptorType

Type Csla.Server.DataPortal.InterceptorType
staticgetset

Gets or sets the type of interceptor invoked by the data portal for pre- and post-processing of each data portal invocation.

Definition at line 556 of file Server/DataPortal.cs.