CorrelationInitializer.CorrelationHandle Propiedad

Definición

Obtiene o establece el argumento de la clase CorrelationHandle para el inicializador de correlación.

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 de propiedad

InArgument<CorrelationHandle>

El argumento de identificador de correlación.

Ejemplos

En el siguiente ejemplo se muestra cómo especificar el inicializador de correlación en una actividad de la clase 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) }
            }
        }
    }
},

Comentarios

El tiempo de ejecución usa para la CorrelationHandle correlación si está presente; de lo contrario, se usará la propiedad CorrelationsWith de la actividad de mensajería. Si están presentes ambos, se usa el identificador ambiente que proporciona CorrelationScope o el servicio de flujo de trabajo.

Se aplica a