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

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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)

Syntax

'Declaration
Public Function CreateChannel ( _
    callbackInstance As InstanceContext, _
    address As EndpointAddress _
) As TChannel
public TChannel CreateChannel(
    InstanceContext callbackInstance,
    EndpointAddress address
)

Parameters

Return Value

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

Exceptions

Exception Condition
ArgumentNullException

address is nulla null reference (Nothing in Visual Basic).

InvalidOperationException

callbackInstance or callbackInstance.UserObject is nulla null reference (Nothing in Visual Basic).

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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