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

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

public TChannel CreateChannel (System.ServiceModel.EndpointAddress address);

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

.NET 8 (package-provided) ja muud versioonid
Toode Versioonid
.NET Core 1.0, Core 1.1, 8 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
UWP 10.0

CreateChannel(EndpointAddress, Uri)

Source:
ChannelFactoryBase.cs

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

public TChannel CreateChannel (System.ServiceModel.EndpointAddress address, Uri via);

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

.NET 8 (package-provided) ja muud versioonid
Toode Versioonid
.NET Core 1.0, Core 1.1, 8 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
UWP 10.0