다음을 통해 공유


While.Condition 속성

정의

While 루프를 반복하기 전에 매번 평가할 Activity<TResult>입니다.

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; }
[<System.Windows.Markup.DependsOn("Variables")>]
member this.Condition : System.Activities.Activity<bool> with get, set
Public Property Condition As Activity(Of Boolean)

속성 값

조건입니다.

특성

예제

다음 코드 샘플에서는 활동의 Condition 속성을 설정하는 방법을 While 보여 줍니다.

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

적용 대상