DuplexChannelFactory<TChannel>.CreateChannel Method (InstanceContext, EndpointAddress)

Creates a duplex channel between a service and a callback instance on the client.

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

public TChannel CreateChannel(
	InstanceContext callbackInstance,
	EndpointAddress address
)

Parameters

callbackInstance
Type: System.ServiceModel.InstanceContext
The InstanceContext that the client uses to listen for messages from the connected service.
address
Type: System.ServiceModel.EndpointAddress
The EndpointAddress that provides the location of the service.

Return Value

Type: TChannel
A duplex channel of type TChannel, the generic parameter for the factory, between the client and service.

ExceptionCondition
ArgumentNullException

address is null.

InvalidOperationException

callbackInstance or callbackInstance.UserObject is null.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: