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.DataPortalClient.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.DataPortalClient.HttpProxy:
Csla.DataPortalClient.DataPortalProxy Csla.DataPortalClient.IDataPortalProxy Csla.Server.IDataPortalServer Csla.DataPortalClient.HttpCompressionProxy

Public Member Functions

 HttpProxy ()
 Creates an instance of the object, initializing it to use the DefaultUrl values. More...
 
 HttpProxy (string dataPortalUrl)
 Creates an instance of the object, initializing it to use the supplied URL. More...
 
 HttpProxy (HttpClient httpClient)
 Creates an instance of the object, initializing it to use the supplied HttpClient object. More...
 
 HttpProxy (HttpClient httpClient, string dataPortalUrl)
 Creates an instance of the object, initializing it to use the supplied HttpClient 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 HttpClientHandler GetHttpClientHandler ()
 Gets an HttpClientHandler for use in initializing the HttpClient instance. More...
 
virtual HttpClient GetHttpClient ()
 Gets an HttpClient object for use in communication with the server. More...
 
virtual WebClient GetWebClient ()
 Gets an WebClient object for use in communication with the server. More...
 
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 More...
 
virtual void SetHttpRequestHeaders (HttpRequestMessage request)
 Override to set headers or other properties of the HttpRequestMessage before it is sent to the 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...
 

Properties

static bool UseTextSerialization = false [getset]
 Gets or sets a value indicating whether to use text/string serialization instead of the default binary serialization. More...
 
- 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 http.

Definition at line 26 of file HttpProxy.cs.

Constructor & Destructor Documentation

◆ HttpProxy() [1/4]

Csla.DataPortalClient.HttpProxy.HttpProxy ( )

Creates an instance of the object, initializing it to use the DefaultUrl values.

Definition at line 33 of file HttpProxy.cs.

◆ HttpProxy() [2/4]

Csla.DataPortalClient.HttpProxy.HttpProxy ( string  dataPortalUrl)

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

Parameters
dataPortalUrlServer endpoint URL

Definition at line 42 of file HttpProxy.cs.

◆ HttpProxy() [3/4]

Csla.DataPortalClient.HttpProxy.HttpProxy ( HttpClient  httpClient)

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

Parameters
httpClientHttpClient instance

Definition at line 52 of file HttpProxy.cs.

◆ HttpProxy() [4/4]

Csla.DataPortalClient.HttpProxy.HttpProxy ( HttpClient  httpClient,
string  dataPortalUrl 
)

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

Parameters
httpClientHttpClient instance
dataPortalUrlServer endpoint URL

Definition at line 63 of file HttpProxy.cs.

Member Function Documentation

◆ CallDataPortalServer()

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

Select client to make request based on isSync parameter and 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 134 of file HttpProxy.cs.

◆ GetHttpClient()

virtual HttpClient Csla.DataPortalClient.HttpProxy.GetHttpClient ( )
protectedvirtual

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

Definition at line 84 of file HttpProxy.cs.

◆ GetHttpClientHandler()

virtual HttpClientHandler Csla.DataPortalClient.HttpProxy.GetHttpClientHandler ( )
protectedvirtual

Gets an HttpClientHandler for use in initializing the HttpClient instance.

Reimplemented in Csla.DataPortalClient.HttpCompressionProxy.

Definition at line 75 of file HttpProxy.cs.

◆ GetWebClient()

virtual WebClient Csla.DataPortalClient.HttpProxy.GetWebClient ( )
protectedvirtual

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

Reimplemented in Csla.DataPortalClient.HttpCompressionProxy.

Definition at line 114 of file HttpProxy.cs.

◆ SetHttpRequestHeaders()

virtual void Csla.DataPortalClient.HttpProxy.SetHttpRequestHeaders ( HttpRequestMessage  request)
protectedvirtual

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

Parameters
requestHttpRequestMessage instance

Reimplemented in Csla.DataPortalClient.HttpCompressionProxy.

Definition at line 146 of file HttpProxy.cs.

Property Documentation

◆ UseTextSerialization

bool Csla.DataPortalClient.HttpProxy.UseTextSerialization = false
staticgetset

Gets or sets a value indicating whether to use text/string serialization instead of the default binary serialization.

Definition at line 124 of file HttpProxy.cs.