Share via


CorrelationInitializer.CorrelationHandle Vlastnost

Definice

Získá nebo nastaví CorrelationHandle argument pro inicializátor korelace.

public:
 property System::Activities::InArgument<System::ServiceModel::Activities::CorrelationHandle ^> ^ CorrelationHandle { System::Activities::InArgument<System::ServiceModel::Activities::CorrelationHandle ^> ^ get(); void set(System::Activities::InArgument<System::ServiceModel::Activities::CorrelationHandle ^> ^ value); };
public System.Activities.InArgument<System.ServiceModel.Activities.CorrelationHandle> CorrelationHandle { get; set; }
member this.CorrelationHandle : System.Activities.InArgument<System.ServiceModel.Activities.CorrelationHandle> with get, set
Public Property CorrelationHandle As InArgument(Of CorrelationHandle)

Hodnota vlastnosti

Argument popisovače korelace.

Příklady

Následující příklad ukazuje, jak zadat inicializátor korelace v aktivitě SendReply .

new SendReply
{
    Request = submitPO,
    Content = SendContent.Create(new InArgument<int>( (e) => po.Get(e).Id)), // creates a SendMessageContent
    CorrelationInitializers =
    {
        new QueryCorrelationInitializer
        {
            // initializes a correlation based on the PurchaseOrder Id sent in the reply message and stores it in the handle
            CorrelationHandle = poidHandle,
            MessageQuerySet = new MessageQuerySet
            {
                // int is the name of the parameter being sent in the outgoing response
                { "PoId", new XPathMessageQuery("sm:body()/ser:int", Constants.XPathMessageContext) }
            }
        }
    }
},

Poznámky

Modul runtime používá CorrelationHandle pro korelaci, pokud je k dispozici, jinak se použije vlastnost CorrelationsWith aktivity zasílání zpráv. Pokud chybí obojí, použije se popisovač okolí poskytovaný službou CorrelationScope pracovního postupu.

Platí pro