CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.Channels.Local.LocalProxy Class Reference

Implements a data portal proxy to relay data portal calls to an application server hosted locally in the client process and AppDomain. More...

Inheritance diagram for Csla.Channels.Local.LocalProxy:
Csla.DataPortalClient.DataPortalProxy Csla.DataPortalClient.IDataPortalProxy Csla.Server.IDataPortalServer

Public Member Functions

 LocalProxy (ApplicationContext applicationContext, LocalProxyOptions options)
 Creates an instance of the type.
override async Task< DataPortalResultCreate ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] 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.
Exceptions
ArgumentNullExceptionobjectType , criteria or context is null.

override async Task< DataPortalResultFetch ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] 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.
Exceptions
ArgumentNullExceptionobjectType , criteria or context is null.

override async Task< DataPortalResultUpdate (ICslaObject 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.
Exceptions
ArgumentNullExceptionobj or context is null.

override async Task< DataPortalResultDelete ([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] 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.
Exceptions
ArgumentNullExceptionobjectType , criteria or context is null.

Protected Member Functions

override Task< byte[]> CallDataPortalServer (byte[] serialized, string operation, string? routingToken, bool isSync)
 Not needed/implemented for Local Data Portal - throws not supported exception.
virtual void RestoringClientSideApplicationContext (ApplicationContext serverScopedApplicationContext, ApplicationContext clientSideApplicationContext)
 Method called once when execution returns to ApplicationContext.LogicalExecutionLocations.Client after a call to the dataportal. Only called when LocalProxyOptions.UseLocalScope is true.
Protected Member Functions inherited from Csla.DataPortalClient.DataPortalProxy
 DataPortalProxy (ApplicationContext applicationContext)
virtual CriteriaRequest ConvertRequest (CriteriaRequest request)
 Override this method to manipulate the message request data sent to the server.
virtual UpdateRequest ConvertRequest (UpdateRequest request)
 Override this method to manipulate the message request data sent to the server.
virtual DataPortalResponse ConvertResponse (DataPortalResponse response)
 Override this method to manipulate the message request data returned from the server.
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 Serialized response from server.
virtual void OnServerComplete (DataPortalResult result, Type objectType, DataPortalOperations operationType)
 Called after completion of DataPortal operation regardless if operation was originated from the client or from chained calls on the server side.
virtual void OnServerCompleteClient (DataPortalResult result, Type objectType, DataPortalOperations operationType)
 Called after completion of a DataPortal operation which was initiated from the ApplicationContext.ExecutionLocations.Client This is NOT called on completion of chained DataPortal operations initiated on the server side.

Properties

ApplicationContext CallerApplicationContext [get]
 Application Context supplied in CTOR. If this LocalProxy was created on client side or if LocalProxyOptions.UseLocalScope is false then it is the client ApplicationContext.
override bool IsServerRemote [get]
 Gets 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.
override string DataPortalUrl [get]
Properties inherited from Csla.DataPortalClient.DataPortalProxy
ApplicationContext ApplicationContext [get]
 Gets or sets the current ApplicationContext object.
virtual bool IsServerRemote [get]
 Gets a value indicating whether the data portal is hosted on a remote server.
string DataPortalUrl [get]
 Gets the URL address for the data portal server used by this proxy instance.

Detailed Description

Implements a data portal proxy to relay data portal calls to an application server hosted locally in the client process and AppDomain.

Constructor & Destructor Documentation

◆ LocalProxy()

Csla.Channels.Local.LocalProxy.LocalProxy ( ApplicationContext applicationContext,
LocalProxyOptions options )
inline

Creates an instance of the type.

Parameters
applicationContextApplicationContext
optionsOptions instance

Member Function Documentation

◆ CallDataPortalServer()

override Task< byte[]> Csla.Channels.Local.LocalProxy.CallDataPortalServer ( byte[] serialized,
string operation,
string? routingToken,
bool isSync )
inlineprotected

Not needed/implemented for Local Data Portal - throws not supported exception.

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

◆ Create()

override async Task< DataPortalResult > Csla.Channels.Local.LocalProxy.Create ( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType,
object criteria,
DataPortalContext context,
bool isSync )
inlinevirtual

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.
Exceptions
ArgumentNullExceptionobjectType , criteria or context is null.

Reimplemented from Csla.DataPortalClient.DataPortalProxy.

◆ Delete()

override async Task< DataPortalResult > Csla.Channels.Local.LocalProxy.Delete ( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType,
object criteria,
DataPortalContext context,
bool isSync )
inlinevirtual

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.
Exceptions
ArgumentNullExceptionobjectType , criteria or context is null.

Reimplemented from Csla.DataPortalClient.DataPortalProxy.

◆ Fetch()

override async Task< DataPortalResult > Csla.Channels.Local.LocalProxy.Fetch ( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors)] Type objectType,
object criteria,
DataPortalContext context,
bool isSync )
inlinevirtual

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.
Exceptions
ArgumentNullExceptionobjectType , criteria or context is null.

Reimplemented from Csla.DataPortalClient.DataPortalProxy.

◆ RestoringClientSideApplicationContext()

virtual void Csla.Channels.Local.LocalProxy.RestoringClientSideApplicationContext ( ApplicationContext serverScopedApplicationContext,
ApplicationContext clientSideApplicationContext )
inlineprotectedvirtual

Method called once when execution returns to ApplicationContext.LogicalExecutionLocations.Client after a call to the dataportal. Only called when LocalProxyOptions.UseLocalScope is true.

Parameters
serverScopedApplicationContextContext created in a new scope for use during logical server side operations
clientSideApplicationContextOriginal context from the client side

◆ Update()

override async Task< DataPortalResult > Csla.Channels.Local.LocalProxy.Update ( ICslaObject obj,
DataPortalContext context,
bool isSync )
inlinevirtual

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.
Exceptions
ArgumentNullExceptionobj or context is null.

Reimplemented from Csla.DataPortalClient.DataPortalProxy.

Property Documentation

◆ CallerApplicationContext

ApplicationContext Csla.Channels.Local.LocalProxy.CallerApplicationContext
getprotected

Application Context supplied in CTOR. If this LocalProxy was created on client side or if LocalProxyOptions.UseLocalScope is false then it is the client ApplicationContext.

◆ DataPortalUrl

override string Csla.Channels.Local.LocalProxy.DataPortalUrl
get

◆ IsServerRemote

override bool Csla.Channels.Local.LocalProxy.IsServerRemote
get

Gets 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.

Implements Csla.DataPortalClient.IDataPortalProxy.


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