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.WcfProxy Class Reference

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

Inheritance diagram for Csla.DataPortalClient.WcfProxy:
Csla.DataPortalClient.IDataPortalProxy Csla.Server.IDataPortalServer

Public Member Functions

 WcfProxy ()
 Creates an instance of the object, initializing it to use the DefaultUrl and DefaultBinding values. More...
 
 WcfProxy (string dataPortalUrl)
 Creates an instance of the object, initializing it to use the supplied URL and DefaultBinding values. More...
 
async Task< DataPortalResultCreate (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by DataPortal to create a new business object. More...
 
async Task< DataPortalResultFetch (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by DataPortal to load an existing business object. More...
 
async Task< DataPortalResultUpdate (object obj, DataPortalContext context, bool isSync)
 Called by DataPortal to update a business object. More...
 
async Task< DataPortalResultDelete (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by DataPortal to delete a business object. More...
 

Protected Member Functions

virtual ChannelFactory< IWcfPortalGetChannelFactory ()
 Returns an instance of the channel factory used by GetProxy() to create the WCF proxy object. More...
 
virtual IWcfPortal GetProxy (ChannelFactory< IWcfPortal > cf)
 Returns the WCF proxy object used for communication with the data portal server. More...
 

Properties

static System.ServiceModel.Channels.Binding DefaultBinding [getset]
 Gets or sets the default binding used to initialize future instances of WcfProxy. More...
 
static string DefaultUrl [getset]
 Gets or sets the default URL address for the data portal server. More...
 
static string DefaultEndPoint [getset]
 Gets or sets the default WCF endpoint name for the data portal server. More...
 
bool IsServerRemote [get]
 Gets a value indicating whether the data portal is hosted on a remote server. More...
 
System.ServiceModel.Channels.Binding Binding [getprotected set]
 Gets the binding object used by this proxy instance. More...
 
string DataPortalUrl [getprotected set]
 Gets the URL address for the data portal server used by this proxy instance. More...
 
string EndPoint [getprotected set]
 Gets the WCF endpoint name 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 WCF.

Definition at line 21 of file WcfProxy.cs.

Constructor & Destructor Documentation

◆ WcfProxy() [1/2]

Csla.DataPortalClient.WcfProxy.WcfProxy ( )

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

Definition at line 86 of file WcfProxy.cs.

◆ WcfProxy() [2/2]

Csla.DataPortalClient.WcfProxy.WcfProxy ( string  dataPortalUrl)

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

Parameters
dataPortalUrlServer endpoint URL

Definition at line 99 of file WcfProxy.cs.

Member Function Documentation

◆ Create()

async Task< DataPortalResult > Csla.DataPortalClient.WcfProxy.Create ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)

Called by DataPortal to 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.

Implements Csla.Server.IDataPortalServer.

Definition at line 173 of file WcfProxy.cs.

◆ Delete()

async Task< DataPortalResult > Csla.DataPortalClient.WcfProxy.Delete ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)

Called by DataPortal to 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.

Implements Csla.Server.IDataPortalServer.

Definition at line 285 of file WcfProxy.cs.

◆ Fetch()

async Task< DataPortalResult > Csla.DataPortalClient.WcfProxy.Fetch ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)

Called by DataPortal to load an existing 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.

Implements Csla.Server.IDataPortalServer.

Definition at line 210 of file WcfProxy.cs.

◆ GetChannelFactory()

virtual ChannelFactory< IWcfPortal > Csla.DataPortalClient.WcfProxy.GetChannelFactory ( )
protectedvirtual

Returns an instance of the channel factory used by GetProxy() to create the WCF proxy object.

If DataPortalUrl is given, the factory will be created using it and the default binding. Otherwise, it will use the endpoint config from app/web.config.

Definition at line 142 of file WcfProxy.cs.

◆ GetProxy()

virtual IWcfPortal Csla.DataPortalClient.WcfProxy.GetProxy ( ChannelFactory< IWcfPortal cf)
protectedvirtual

Returns the WCF proxy object used for communication with the data portal server.

Parameters
cfThe ChannelFactory created by GetChannelFactory().

Definition at line 158 of file WcfProxy.cs.

◆ Update()

async Task< DataPortalResult > Csla.DataPortalClient.WcfProxy.Update ( object  obj,
DataPortalContext  context,
bool  isSync 
)

Called by DataPortal to update a business object.

Parameters
objThe business object to update.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Implements Csla.Server.IDataPortalServer.

Definition at line 247 of file WcfProxy.cs.

Property Documentation

◆ Binding

System.ServiceModel.Channels.Binding Csla.DataPortalClient.WcfProxy.Binding
getprotected set

Gets the binding object used by this proxy instance.

Definition at line 118 of file WcfProxy.cs.

◆ DataPortalUrl

string Csla.DataPortalClient.WcfProxy.DataPortalUrl
getprotected set

Gets the URL address for the data portal server used by this proxy instance.

Definition at line 124 of file WcfProxy.cs.

◆ DefaultBinding

System.ServiceModel.Channels.Binding Csla.DataPortalClient.WcfProxy.DefaultBinding
staticgetset

Gets or sets the default binding used to initialize future instances of WcfProxy.

Definition at line 31 of file WcfProxy.cs.

◆ DefaultEndPoint

string Csla.DataPortalClient.WcfProxy.DefaultEndPoint
staticgetset

Gets or sets the default WCF endpoint name for the data portal server.

Definition at line 75 of file WcfProxy.cs.

◆ DefaultUrl

string Csla.DataPortalClient.WcfProxy.DefaultUrl
staticgetset

Gets or sets the default URL address for the data portal server.

Deprecated: use ApplicationContext.DataPortalUrlString

Definition at line 65 of file WcfProxy.cs.

◆ EndPoint

string Csla.DataPortalClient.WcfProxy.EndPoint
getprotected set

Gets the WCF endpoint name for the data portal server used by this proxy instance.

Definition at line 130 of file WcfProxy.cs.

◆ IsServerRemote

bool Csla.DataPortalClient.WcfProxy.IsServerRemote
get

Gets a value indicating whether the data portal is hosted on a remote server.

Definition at line 110 of file WcfProxy.cs.