DuplexChannelFactory<TChannel> Constructor (InstanceContext, ServiceEndpoint)


Initializes a new instance of the DuplexChannelFactory<TChannel> class with an object that implements the callback contract and a specified endpoint.

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

public DuplexChannelFactory(
	InstanceContext callbackInstance,
	ServiceEndpoint endpoint


Type: System.ServiceModel.InstanceContext

The InstanceContext that the client uses to listen for messages from the connected service.

Type: System.ServiceModel.Description.ServiceEndpoint

The ServiceEndpoint to which channels produced by the factory connect.

Exception Condition

callbackInstance is null.

Use this constructor to pass an instance context object that implements the callback contract for the target service and to pass the endpoint information programmatically rather than by using an application configuration file.

.NET Framework
Available since 3.0
Return to top