Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ClientBase<TChannel> Constructor (InstanceContext^)

 

Initializes a new instance of the ClientBase<TChannel> class using the callbackInstance as the callback object in a duplex conversation.

Namespace:   System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

protected:
ClientBase(
	InstanceContext^ callbackInstance
)

Parameters

callbackInstance
Type: System.ServiceModel::InstanceContext^

The callback object that the client application uses to listen for messages from the connected service.

Exception Condition
ArgumentNullException

The callback instance is null.

InvalidOperationException

Either there is no default endpoint information in the configuration file, more than one endpoint in the file, or no configuration file.

Use this constructor when the service contract requires a callback service instance. The target endpoint is constructed from the type parameter and information in the application configuration file.

The following code example shows how to use this constructor with a SampleDuplexHelloClient class to pass a callback object that listens for messages from the service.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft