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

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

Inheritance diagram for Csla.Channels.Http.HttpProxy:
Csla.DataPortalClient.DataPortalProxy Csla.DataPortalClient.IDataPortalProxy Csla.Server.IDataPortalServer Csla.Channels.Http.HttpCompressionProxy

Public Member Functions

 HttpProxy (ApplicationContext applicationContext, HttpClient httpClient, HttpProxyOptions options, DataPortalOptions dataPortalOptions)
 Creates an instance of the type, initializing it to use the supplied HttpClient object and options.
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 ? HttpClientHandler GetHttpClientHandler ()
 Gets an HttpClientHandler for use in initializing the HttpClient instance.
virtual HttpClient GetHttpClient ()
 Gets an HttpClient object for use in asynchronous communication with the server.
virtual WebClient GetWebClient ()
 Gets an WebClient object for use in synchronous communication with the server.
override async Task< byte[]> CallDataPortalServer (byte[] serialized, string operation, string? routingToken, bool isSync)
 Select client to make request based on isSync parameter and return response from server.
virtual void SetHttpRequestHeaders (HttpRequestMessage request)
 Override to set headers or other properties of the HttpRequestMessage before it is sent to the server (asynchronous only).
virtual void SetWebClientHeaders (WebClient client)
 Override to set headers or other properties of the WebClient before it is sent to the server (synchronous only).
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

HttpProxyOptions Options [get, set]
 Current options for the proxy.
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 http.

Constructor & Destructor Documentation

◆ HttpProxy()

Csla.Channels.Http.HttpProxy.HttpProxy ( ApplicationContext applicationContext,
HttpClient httpClient,
HttpProxyOptions options,
DataPortalOptions dataPortalOptions )
inline

Creates an instance of the type, initializing it to use the supplied HttpClient object and options.

Parameters
applicationContext
httpClientHttpClient instance
optionsOptions for HttpProxy
dataPortalOptionsData portal options

Member Function Documentation

◆ CallDataPortalServer()

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

Select client to make request based on isSync parameter and 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

◆ GetHttpClient()

virtual HttpClient Csla.Channels.Http.HttpProxy.GetHttpClient ( )
inlineprotectedvirtual

Gets an HttpClient object for use in asynchronous communication with the server.

◆ GetHttpClientHandler()

virtual ? HttpClientHandler Csla.Channels.Http.HttpProxy.GetHttpClientHandler ( )
inlineprotectedvirtual

Gets an HttpClientHandler for use in initializing the HttpClient instance.

Reimplemented in Csla.Channels.Http.HttpCompressionProxy.

◆ GetWebClient()

virtual WebClient Csla.Channels.Http.HttpProxy.GetWebClient ( )
inlineprotectedvirtual

Gets an WebClient object for use in synchronous communication with the server.

Reimplemented in Csla.Channels.Http.HttpCompressionProxy.

◆ SetHttpRequestHeaders()

virtual void Csla.Channels.Http.HttpProxy.SetHttpRequestHeaders ( HttpRequestMessage request)
inlineprotectedvirtual

Override to set headers or other properties of the HttpRequestMessage before it is sent to the server (asynchronous only).

Parameters
requestHttpRequestMessage instance

Reimplemented in Csla.Channels.Http.HttpCompressionProxy.

◆ SetWebClientHeaders()

virtual void Csla.Channels.Http.HttpProxy.SetWebClientHeaders ( WebClient client)
inlineprotectedvirtual

Override to set headers or other properties of the WebClient before it is sent to the server (synchronous only).

Parameters
clientWebClient instance

Property Documentation

◆ DataPortalUrl

override string Csla.Channels.Http.HttpProxy.DataPortalUrl
get

◆ Options

HttpProxyOptions Csla.Channels.Http.HttpProxy.Options
getsetprotected

Current options for the proxy.


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