CorrelationInitializer.CorrelationHandle Propriedade

Definição

Obtém ou define o argumento CorrelationHandle para o inicializador de correlação.Gets or sets the CorrelationHandle argument for the correlation initializer.

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)

Valor da propriedade

InArgument<CorrelationHandle>

O argumento identificador de correlação.The correlation handle argument.

Exemplos

O exemplo a seguir mostra como especificar o inicializador de correlação em uma SendReply atividade.The following example shows how to specify the correlation initializer in a SendReply activity.

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) }
            }
        }
    }
},

Comentários

O tempo de execução usa o CorrelationHandle para correlação, se estiver presente, caso contrário, a propriedade CorrelatesWith da atividade de mensagens será usada.The runtime uses the CorrelationHandle for correlation if it is present, otherwise the CorrelatesWith property of the messaging activity will be used. Se ambos estiverem ausentes, o identificador de ambiente fornecido pelo CorrelationScope ou pelo serviço de fluxo de trabalho será usado.If both are absent, the ambient handle provided by CorrelationScope or the workflow service is used.

Aplica-se a