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.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 (string dataPortalUrl)
 Creates an instance of the object, initializing it to use the supplied URL. More...
 
 GrpcProxy (GrpcChannel channel)
 Creates an instance of the object, initializing it to use the supplied GrpcChannel object. More...
 
 GrpcProxy (GrpcChannel channel, string dataPortalUrl)
 Creates an instance of the object, initializing it to use the supplied GrpcChannel object and URL. More...
 
- Public Member Functions inherited from Csla.DataPortalClient.DataPortalProxy
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 GrpcChannel GetChannel ()
 Gets the GrpcChannel used by the gRPC client. More...
 
virtual GrpcService.GrpcServiceClient GetGrpcClient ()
 Get gRPC client object used by data portal. More...
 
override async Task< byte[]> CallDataPortalServer (byte[] serialized, string operation, string routingToken, bool isSync)
 Create message and send to Grpc server. More...
 
- Protected Member Functions inherited from Csla.DataPortalClient.DataPortalProxy
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...
 

Static Protected Member Functions

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

Additional Inherited Members

- Properties inherited from Csla.DataPortalClient.DataPortalProxy
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 = ApplicationContext.DataPortalUrlString [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 by using gRPC.

Definition at line 27 of file GrpcProxy.cs.

Constructor & Destructor Documentation

◆ GrpcProxy() [1/3]

Csla.Channels.Grpc.GrpcProxy.GrpcProxy ( string  dataPortalUrl)

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

Parameters
dataPortalUrlServer endpoint URL

Definition at line 34 of file GrpcProxy.cs.

◆ GrpcProxy() [2/3]

Csla.Channels.Grpc.GrpcProxy.GrpcProxy ( GrpcChannel  channel)

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

Parameters
channelGrpcChannel instance

Definition at line 43 of file GrpcProxy.cs.

◆ GrpcProxy() [3/3]

Csla.Channels.Grpc.GrpcProxy.GrpcProxy ( GrpcChannel  channel,
string  dataPortalUrl 
)

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

Parameters
channelGrpcChannel instance
dataPortalUrlServer endpoint URL

Definition at line 53 of file GrpcProxy.cs.

Member Function Documentation

◆ CallDataPortalServer()

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

Create message and send to Grpc server.

Return 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

Implements Csla.DataPortalClient.DataPortalProxy.

Definition at line 105 of file GrpcProxy.cs.

◆ GetChannel()

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

Gets the GrpcChannel used by the gRPC client.

Returns

Definition at line 66 of file GrpcProxy.cs.

◆ GetGrpcClient()

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

Get gRPC client object used by data portal.

Returns

Definition at line 91 of file GrpcProxy.cs.

◆ SetChannel()

static void Csla.Channels.Grpc.GrpcProxy.SetChannel ( GrpcChannel  channel)
staticprotected

Sets the GrpcChannel used by gRPC clients.

Parameters
channelGrpcChannel instance

Definition at line 80 of file GrpcProxy.cs.