While.Condition Propiedad

Definición

Activity<TResult> que se debe evaluar antes de cada iteración del bucle While.The Activity<TResult> to be evaluated before each iteration of the While loop.

public:
 property System::Activities::Activity<bool> ^ Condition { System::Activities::Activity<bool> ^ get(); void set(System::Activities::Activity<bool> ^ value); };
[System.Windows.Markup.DependsOn("Variables")]
public System.Activities.Activity<bool> Condition { get; set; }
member this.Condition : System.Activities.Activity<bool> with get, set
Public Property Condition As Activity(Of Boolean)

Valor de propiedad

La condición.The condition.

Atributos

Ejemplos

En la siguiente muestra de código se muestra la configuración de la propiedad Condition de una actividad de la clase While.The following code sample demonstrates setting the Condition 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