다음을 통해 공유


While 생성자

정의

While 활동의 새 인스턴스를 만듭니다.

오버로드

While()

While 활동의 새 인스턴스를 만듭니다.

While(Activity<Boolean>)

While 활동의 새 인스턴스를 만듭니다.

While(Expression<Func<ActivityContext,Boolean>>)

While 활동의 새 인스턴스를 만듭니다.

예제

다음 코드 샘플에서는 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
    }
},

While()

While 활동의 새 인스턴스를 만듭니다.

public:
 While();
public While ();
Public Sub New ()

예제

다음 코드 샘플에서는 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
    }
},

적용 대상

While(Activity<Boolean>)

While 활동의 새 인스턴스를 만듭니다.

public:
 While(System::Activities::Activity<bool> ^ condition);
public While (System.Activities.Activity<bool> condition);
new System.Activities.Statements.While : System.Activities.Activity<bool> -> System.Activities.Statements.While
Public Sub New (condition As Activity(Of Boolean))

매개 변수

condition
Activity<Boolean>

활동이 반복되는 조건입니다.

적용 대상

While(Expression<Func<ActivityContext,Boolean>>)

While 활동의 새 인스턴스를 만듭니다.

public:
 While(System::Linq::Expressions::Expression<Func<System::Activities::ActivityContext ^, bool> ^> ^ condition);
public While (System.Linq.Expressions.Expression<Func<System.Activities.ActivityContext,bool>> condition);
new System.Activities.Statements.While : System.Linq.Expressions.Expression<Func<System.Activities.ActivityContext, bool>> -> System.Activities.Statements.While
Public Sub New (condition As Expression(Of Func(Of ActivityContext, Boolean)))

매개 변수

condition
Expression<Func<ActivityContext,Boolean>>

활동이 반복되는 조건입니다.

적용 대상