แก้ไข

แชร์ผ่าน


SendActivity.ChannelToken Property

Definition

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

public:
 property System::Workflow::Activities::ChannelToken ^ ChannelToken { System::Workflow::Activities::ChannelToken ^ get(); void set(System::Workflow::Activities::ChannelToken ^ value); };
public System.Workflow.Activities.ChannelToken ChannelToken { get; set; }
member this.ChannelToken : System.Workflow.Activities.ChannelToken with get, set
Public Property ChannelToken As ChannelToken

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