Aracılığıyla paylaş


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

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 Overridable Function CreateChannel ( _
    callbackInstance As InstanceContext, _
    address As EndpointAddress, _
    via As Uri _
) As TChannel
public virtual TChannel CreateChannel(
    InstanceContext callbackInstance,
    EndpointAddress address,
    Uri via
)

Parameters

  • via
    Type: System.Uri
    The Uri that contains the transport address to which the message is sent.

Return Value

Type: TChannel
A 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.