DuplexClientBase<TChannel> Class
Used to create a channel to a duplex service and associate that channel with a callback object.
System.ServiceModel::ClientBase<TChannel>
System.ServiceModel::DuplexClientBase<TChannel>
Assembly: System.ServiceModel (in System.ServiceModel.dll)
The DuplexClientBase<TChannel> type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | DuplexClientBase<TChannel>(InstanceContext) | Initializes a new instance of the DuplexClientBase<TChannel> class using the specified callback object. |
![]() | DuplexClientBase<TChannel>(Object) | Initializes a new instance of the DuplexClientBase<TChannel> class using the specified callback object. |
![]() | DuplexClientBase<TChannel>(InstanceContext, ServiceEndpoint) | Initializes a new instance of the DuplexClientBase<TChannel> class with the specified callback object and service endpoint. |
![]() | DuplexClientBase<TChannel>(InstanceContext, String) | Initializes a new instance of the DuplexClientBase<TChannel> class using the specified callback object and configuration name. |
![]() | DuplexClientBase<TChannel>(Object, ServiceEndpoint) | Initializes a new instance of the DuplexClientBase<TChannel> class with the specified callback object and service endpoint. |
![]() | DuplexClientBase<TChannel>(Object, String) | Initializes a new instance of the DuplexClientBase<TChannel> class using the specified callback object and configuration name. |
![]() | DuplexClientBase<TChannel>(InstanceContext, Binding, EndpointAddress) | Initializes a new instance of the DuplexClientBase<TChannel> class using the specified callback object, binding, and service endpoint address. |
![]() | DuplexClientBase<TChannel>(InstanceContext, String, EndpointAddress) | Initializes a new instance of the DuplexClientBase<TChannel> class using the specified callback object, configuration name, and service endpoint address. |
![]() | DuplexClientBase<TChannel>(InstanceContext, String, String) | Initializes a new instance of the DuplexClientBase<TChannel> class using the specified callback object, configuration name, and service endpoint address. |
![]() | DuplexClientBase<TChannel>(Object, Binding, EndpointAddress) | Initializes a new instance of the DuplexClientBase<TChannel> class using the specified callback object, binding, and service endpoint address. |
![]() | DuplexClientBase<TChannel>(Object, String, EndpointAddress) | Initializes a new instance of the DuplexClientBase<TChannel> class using the specified callback object, configuration name, and service endpoint address. |
![]() | DuplexClientBase<TChannel>(Object, String, String) | Initializes a new instance of the DuplexClientBase<TChannel> class using the specified callback object, endpoint configuration name, and service endpoint address. |
| Name | Description | |
|---|---|---|
![]() | Channel | Gets the inner channel used to to send messages to variously configured service endpoints. (Inherited from ClientBase<TChannel>.) |
![]() | ChannelFactory | Gets the underlying ChannelFactory<TChannel> object. (Inherited from ClientBase<TChannel>.) |
![]() | ClientCredentials | Gets the client credentials used to call an operation. (Inherited from ClientBase<TChannel>.) |
![]() | Endpoint | Gets the target endpoint for the service to which the client can connect. (Inherited from ClientBase<TChannel>.) |
![]() | InnerChannel | Gets the underlying IClientChannel implementation. (Inherited from ClientBase<TChannel>.) |
![]() | InnerDuplexChannel | Gets the inner duplex channel. |
![]() | State | Gets the current state of the ClientBase<TChannel> object. (Inherited from ClientBase<TChannel>.) |
| Name | Description | |
|---|---|---|
![]() | Abort | Causes the ClientBase<TChannel> object to transition immediately from its current state into the closed state. (Inherited from ClientBase<TChannel>.) |
![]() | Close | Causes the ClientBase<TChannel> object to transition from its current state into the closed state. (Inherited from ClientBase<TChannel>.) |
![]() | CreateChannel | Returns a channel to the service associated with the callback object passed to the constructor. (Overrides ClientBase<TChannel>::CreateChannel().) |
![]() | DisplayInitializationUI | Instructs the inner channel to display a user interface if one is required to initialize the channel prior to using it. (Inherited from ClientBase<TChannel>.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetDefaultValueForInitialization<T> | Replicates the behavior of the default keyword in C#. (Inherited from ClientBase<TChannel>.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | InvokeAsync | Provides support for implementing the event-based asynchronous pattern. For more information about this pattern, see Event-based Asynchronous Pattern Overview. (Inherited from ClientBase<TChannel>.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | Open | Causes the ClientBase<TChannel> object to transition from the created state into the opened state. (Inherited from ClientBase<TChannel>.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | ICommunicationObject::BeginClose(AsyncCallback, Object) | Begins an asynchronous operation to close the ClientBase<TChannel>. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::BeginClose(TimeSpan, AsyncCallback, Object) | Begins an asynchronous operation to close the ClientBase<TChannel> with a specified timeout. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::BeginOpen(AsyncCallback, Object) | Begins an asynchronous operation to open the ClientBase<TChannel> object. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::BeginOpen(TimeSpan, AsyncCallback, Object) | Begins an asynchronous operation to open the ClientBase<TChannel> object within a specified interval of time. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::Close(TimeSpan) | Causes the ClientBase<TChannel> object to transition from its current state into the closed state. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::Closed | The event handler that is invoked when the ClientBase<TChannel> object has transitioned from its current state to the closed state. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::Closing | The event handler that is invoked when the ClientBase<TChannel> object transitions from its current state to the closed state. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::EndClose | Completes an asynchronous operation to close the ClientBase<TChannel> object. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::EndOpen | Completes an asynchronous operation to open the ClientBase<TChannel> object. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::Faulted | The event handler that is invoked when a fault occurs while performing an operation on the ClientBase<TChannel> object. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::Open(TimeSpan) | Causes the ClientBase<TChannel> object to transition from the created state into the opened state within a specified interval of time. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::Opened | The event handler that is invoked when the ClientBase<TChannel> object transitions from the created state to the opened state. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | ICommunicationObject::Opening | The event handler that is invoked when the ClientBase<TChannel> object transitions from the created state to the opened state. (Inherited from ClientBase<TChannel>.) |
![]() ![]() | IDisposable::Dispose | Explicit implementation of the Dispose method. (Inherited from ClientBase<TChannel>.) |
Use the DuplexClientBase<TChannel> class to create a channel to a service that specifies a callback object. The DuplexClientBase<TChannel> object wraps a System.ServiceModel::DuplexChannelFactory<TChannel> object, which provides the connectivity for the object. You can use either type to connect to a duplex service. For more information about duplex services, see Duplex Services.
Special note for Managed C++ users deriving from this class:
Put your cleanup code in (On)(Begin)Close (and/or OnAbort), not in a destructor.
Avoid destructors: they cause the compiler to auto-generate IDisposable
Avoid non-reference members: they can cause the compiler to auto-generate IDisposable
Avoid finalizers; but if you include one, you should suppress the build warning and call SuppressFinalize(Object) and the finalizer itself from (On)(Begin)Close (and/or OnAbort) in order to emulate what would have been the auto-generated IDisposable behavior.
The following example shows the use in the client of a duplex client type, the SampleDuplexHelloClient, to pass a new System.ServiceModel::InstanceContext object with the callback object to listen for callbacks.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

