SendActivity.ChannelToken Property

Definition

ChannelToken used by the SendActivity to associate itself with a client channel.

public System.Workflow.Activities.ChannelToken ChannelToken { get; set; }

Property Value

A ChannelToken defining a client channel that a SendActivity uses to communicate with a service.

Examples

The following example shows how to access the ChannelToken property. This example was adapted from the CalculatorClient SDK sample.

ChannelToken channelToken1 = new ChannelToken();
SendActivity requestQuoteFromShipper3 = new SendActivity();
channelToken1.EndpointName = "Shipper3Endpoint";
channelToken1.Name = "Shipper3Endpoint";
channelToken1.OwnerActivityName = "GetShippingQuotes";
requestQuoteFromShipper3.ChannelToken = channelToken1;

Remarks

A channel token specifies the name of the channel, the scope of the channel, and the endpoint configuration name to be used in establishing the channel. The endpoint name in the configuration file has the address, binding, and contract information for a service that the SendActivity activity communicates with.

The channel token also specifies a unique channel name and an owner activity name for the token. A channel token can be shared between multiple send activities that want to use the same endpoint to communicate with a service.

Applies to

產品 版本
.NET Framework 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