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

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

Inheritance diagram for Csla.Channels.Grpc.GrpcProxy:
Csla.DataPortalClient.DataPortalProxy Csla.DataPortalClient.IDataPortalProxy Csla.Server.IDataPortalServer

Public Member Functions

 GrpcProxy (ApplicationContext applicationContext, GrpcChannel channel, GrpcProxyOptions options, DataPortalOptions dataPortalOptions)
 Creates an instance of the object, initializing it to use the supplied GrpcChannel object and URL.
Public Member Functions inherited from Csla.DataPortalClient.DataPortalProxy
virtual 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.

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

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

virtual 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

virtual GrpcChannel GetChannel ()
 Gets the GrpcChannel used by the gRPC client.
virtual GrpcService.GrpcServiceClient GetGrpcClient ()
 Get gRPC client object used by data portal.
override async Task< byte[]> CallDataPortalServer (byte[] serialized, string operation, string? routingToken, bool isSync)
 Create message and send to Grpc server. Return Response from server.
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.

Static Protected Member Functions

static void SetChannel (GrpcChannel channel)
 Sets the GrpcChannel used by gRPC clients.

Properties

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 a remote application server by using gRPC.

Constructor & Destructor Documentation

◆ GrpcProxy()

Csla.Channels.Grpc.GrpcProxy.GrpcProxy ( ApplicationContext applicationContext,
GrpcChannel channel,
GrpcProxyOptions options,
DataPortalOptions dataPortalOptions )
inline

Creates an instance of the object, initializing it to use the supplied GrpcChannel object and URL.

Parameters
applicationContext
channelGrpcChannel instance
optionsProxy options
dataPortalOptionsData portal options
Exceptions
ArgumentNullExceptionapplicationContext , dataPortalOptions or options is null.

Member Function Documentation

◆ CallDataPortalServer()

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

Create message and send to Grpc server. Return Response from server.

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

◆ GetChannel()

virtual GrpcChannel Csla.Channels.Grpc.GrpcProxy.GetChannel ( )
inlineprotectedvirtual

Gets the GrpcChannel used by the gRPC client.

◆ GetGrpcClient()

virtual GrpcService.GrpcServiceClient Csla.Channels.Grpc.GrpcProxy.GetGrpcClient ( )
inlineprotectedvirtual

Get gRPC client object used by data portal.

◆ SetChannel()

void Csla.Channels.Grpc.GrpcProxy.SetChannel ( GrpcChannel channel)
inlinestaticprotected

Sets the GrpcChannel used by gRPC clients.

Parameters
channelGrpcChannel instance
Exceptions
ArgumentNullExceptionchannel is null.

Property Documentation

◆ DataPortalUrl

override string Csla.Channels.Grpc.GrpcProxy.DataPortalUrl
get


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