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.
Csla.DataPortalClient.DataPortalProxy Class Referenceabstract

Implements a data portal proxy to relay data portal calls to a remote application server. More...

Inheritance diagram for Csla.DataPortalClient.DataPortalProxy:
Csla.DataPortalClient.IDataPortalProxy Csla.Server.IDataPortalServer Csla.Channels.Grpc.GrpcProxy Csla.Channels.Http.HttpProxy Csla.Channels.RabbitMq.RabbitMqProxy Csla.Channels.Http.HttpCompressionProxy

Public Member Functions

 DataPortalProxy (ApplicationContext applicationContext)
 
virtual async Task< DataPortalResultCreate (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by DataPortal to create a new business object. More...
 
virtual async Task< DataPortalResultFetch (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by DataPortal to load an existing business object. More...
 
virtual async Task< DataPortalResultUpdate (object obj, DataPortalContext context, bool isSync)
 Called by DataPortal to update a business object. More...
 
virtual async Task< DataPortalResultDelete (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by DataPortal to delete a business object. More...
 

Protected Member Functions

virtual CriteriaRequest ConvertRequest (CriteriaRequest request)
 Override this method to manipulate the message request data sent to the server. More...
 
virtual UpdateRequest ConvertRequest (UpdateRequest request)
 Override this method to manipulate the message request data sent to the server. More...
 
virtual DataPortalResponse ConvertResponse (DataPortalResponse response)
 Override this method to manipulate the message request data returned from the server. More...
 
abstract Task< byte[]> CallDataPortalServer (byte[] serialized, string operation, string routingToken, bool isSync)
 Override this method with implementation of sending and receiving of data to the server Returns serialised response from server More...
 

Properties

ApplicationContext ApplicationContext [getset]
 Gets or sets the current ApplicationContext object. More...
 
virtual bool IsServerRemote [get]
 Gets a value indicating whether the data portal is hosted on a remote server. More...
 
virtual int Timeout [getset]
 Gets or sets the Client timeout in milliseconds (0 uses default timeout). More...
 
string DataPortalUrl [getprotected set]
 Gets the URL address for the data portal server used by this proxy instance. More...
 
- Properties inherited from Csla.DataPortalClient.IDataPortalProxy
bool IsServerRemote [get]
 Get a value indicating whether this proxy will invoke a remote data portal server, or run the "server-side" data portal in the caller's process and AppDomain. More...
 

Detailed Description

Implements a data portal proxy to relay data portal calls to a remote application server.

Definition at line 22 of file DataPortalProxy.cs.

Constructor & Destructor Documentation

◆ DataPortalProxy()

Csla.DataPortalClient.DataPortalProxy.DataPortalProxy ( ApplicationContext  applicationContext)

Parameters
applicationContext

Definition at line 28 of file DataPortalProxy.cs.

Member Function Documentation

◆ CallDataPortalServer()

abstract Task< byte[]> Csla.DataPortalClient.DataPortalProxy.CallDataPortalServer ( byte[]  serialized,
string  operation,
string  routingToken,
bool  isSync 
)
protectedpure virtual

Override this method with implementation of sending and receiving of data to the server Returns serialised response from server

Parameters
serializedSerialised request
operationDataPortal operation
routingTokenRouting Tag for server
isSyncTrue if the client-side proxy should synchronously invoke the server.
Returns
Serialised response from server

Implemented in Csla.Channels.Grpc.GrpcProxy, Csla.Channels.RabbitMq.RabbitMqProxy, and Csla.Channels.Http.HttpProxy.

◆ ConvertRequest() [1/2]

virtual CriteriaRequest Csla.DataPortalClient.DataPortalProxy.ConvertRequest ( CriteriaRequest  request)
protectedvirtual

Override this method to manipulate the message request data sent to the server.

Parameters
requestCriteria request data.

Definition at line 269 of file DataPortalProxy.cs.

◆ ConvertRequest() [2/2]

virtual UpdateRequest Csla.DataPortalClient.DataPortalProxy.ConvertRequest ( UpdateRequest  request)
protectedvirtual

Override this method to manipulate the message request data sent to the server.

Parameters
requestUpdate request data.

Definition at line 279 of file DataPortalProxy.cs.

◆ ConvertResponse()

virtual DataPortalResponse Csla.DataPortalClient.DataPortalProxy.ConvertResponse ( DataPortalResponse  response)
protectedvirtual

Override this method to manipulate the message request data returned from the server.

Parameters
responseResponse data.

Definition at line 289 of file DataPortalProxy.cs.

◆ Create()

virtual async Task< DataPortalResult > Csla.DataPortalClient.DataPortalProxy.Create ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)
virtual

Called by DataPortal to 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.

Reimplemented in Csla.Channels.RabbitMq.RabbitMqProxy.

Definition at line 66 of file DataPortalProxy.cs.

◆ Delete()

virtual async Task< DataPortalResult > Csla.DataPortalClient.DataPortalProxy.Delete ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)
virtual

Called by DataPortal to 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.

Reimplemented in Csla.Channels.RabbitMq.RabbitMqProxy.

Definition at line 220 of file DataPortalProxy.cs.

◆ Fetch()

virtual async Task< DataPortalResult > Csla.DataPortalClient.DataPortalProxy.Fetch ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)
virtual

Called by DataPortal to load an existing 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.

Reimplemented in Csla.Channels.RabbitMq.RabbitMqProxy.

Definition at line 118 of file DataPortalProxy.cs.

◆ Update()

virtual async Task< DataPortalResult > Csla.DataPortalClient.DataPortalProxy.Update ( object  obj,
DataPortalContext  context,
bool  isSync 
)
virtual

Called by DataPortal to update a business object.

Parameters
objThe business 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.

Reimplemented in Csla.Channels.RabbitMq.RabbitMqProxy.

Definition at line 171 of file DataPortalProxy.cs.

Property Documentation

◆ ApplicationContext

ApplicationContext Csla.DataPortalClient.DataPortalProxy.ApplicationContext
getsetprotected

Gets or sets the current ApplicationContext object.

Definition at line 36 of file DataPortalProxy.cs.

◆ DataPortalUrl

string Csla.DataPortalClient.DataPortalProxy.DataPortalUrl
getprotected set

Gets the URL address for the data portal server used by this proxy instance.

Definition at line 54 of file DataPortalProxy.cs.

◆ IsServerRemote

virtual bool Csla.DataPortalClient.DataPortalProxy.IsServerRemote
get

Gets a value indicating whether the data portal is hosted on a remote server.

Definition at line 42 of file DataPortalProxy.cs.

◆ Timeout

virtual int Csla.DataPortalClient.DataPortalProxy.Timeout
getset

Gets or sets the Client timeout in milliseconds (0 uses default timeout).

Definition at line 48 of file DataPortalProxy.cs.