Modifica

Condividi tramite


ChannelFactoryBase<TChannel>.CreateChannel Method

Definition

Creates a particular type of channel with a specified address.

Overloads

CreateChannel(EndpointAddress)

Creates a particular type of channel with a specified endpoint address.

CreateChannel(EndpointAddress, Uri)

Creates a particular type of channel with specified transport and endpoint addresses.

CreateChannel(EndpointAddress)

Source:
ChannelFactoryBase.cs
Source:
ChannelFactoryBase.cs

Creates a particular type of channel with a specified endpoint address.

public:
 virtual TChannel CreateChannel(System::ServiceModel::EndpointAddress ^ address);
public TChannel CreateChannel (System.ServiceModel.EndpointAddress address);
abstract member CreateChannel : System.ServiceModel.EndpointAddress -> 'Channel
override this.CreateChannel : System.ServiceModel.EndpointAddress -> 'Channel
Public Function CreateChannel (address As EndpointAddress) As TChannel

Parameters

address
EndpointAddress

The EndpointAddress of the remote endpoint to which the channel sends messages.

Returns

TChannel

A channel of type TChannel with the specified address.

Implements

Exceptions

address is null.

Remarks

This method calls OnCreateChannel(EndpointAddress, Uri) when invoked. This method cannot be overridden by a derived class.

This uses Uri as the transport address to which messages are sent on the output channel.

Applies to

CreateChannel(EndpointAddress, Uri)

Source:
ChannelFactoryBase.cs
Source:
ChannelFactoryBase.cs

Creates a particular type of channel with specified transport and endpoint addresses.

public:
 virtual TChannel CreateChannel(System::ServiceModel::EndpointAddress ^ address, Uri ^ via);
public TChannel CreateChannel (System.ServiceModel.EndpointAddress address, Uri via);
abstract member CreateChannel : System.ServiceModel.EndpointAddress * Uri -> 'Channel
override this.CreateChannel : System.ServiceModel.EndpointAddress * Uri -> 'Channel
Public Function CreateChannel (address As EndpointAddress, via As Uri) As TChannel

Parameters

address
EndpointAddress

The EndpointAddress of the remote endpoint to which the channel sends messages.

via
Uri

The Uri that contains the transport address to which messages are sent on the output channel.

Returns

TChannel

A channel of type TChannel with the specified remote and transport addresses.

Implements

Remarks

This method calls OnCreateChannel(EndpointAddress, Uri) when invoked.

Applies to