While.Body Propiedad


Actividad Activity que ejecutar en el bucle While.The Activity to execute in the While loop.

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

Valor de propiedad

Actividad que se va a ejecutar.The activity to execute.



En el siguiente ejemplo de código, se muestra la configuración de la propiedad Body de una actividad de la clase While.The following code sample demonstrates setting the Body property of a While activity. Este ejemplo procede del ejemplo de correlación basada en contenido .This example is from the Content-Based Correlation sample.

new While
    Condition = true,
    Body = new Receive
        ServiceContractName = Constants.POContractName,
        OperationName = Constants.UpdatePOName,                                    
        CorrelatesWith = poidHandle, // identifies that the UpdatePO operation is waiting on the PurchaseOrderId that was used to initialize this handle
        CorrelatesOn = new MessageQuerySet // the query that is used on an incoming message to find the requisite PurchaseOrderId specified in the correlation
            // Id is the name of the incoming parameter within the PurchaseOrder
            { "PoId", new XPathMessageQuery("sm:body()/defns:PurchaseOrder/defns:Id", Constants.XPathMessageContext) } 
        Content = ReceiveContent.Create(new OutArgument<PurchaseOrder>(po)) // creates a ReceiveMessageContent

Se aplica a