While Construtores
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Cria uma nova instância da While atividade.
Sobrecargas
| Name | Description |
|---|---|
| While() |
Cria uma nova instância da While atividade. |
| While(Activity<Boolean>) |
Cria uma nova instância da While atividade. |
| While(Expression<Func<ActivityContext,Boolean>>) |
Cria uma nova instância da While atividade. |
Exemplos
O exemplo de código seguinte demonstra como criar uma While atividade.
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()
Cria uma nova instância da While atividade.
public:
While();
public While();
Public Sub New ()
Exemplos
O exemplo de código seguinte demonstra como criar uma While atividade.
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
}
},
Aplica-se a
While(Activity<Boolean>)
Cria uma nova instância da While atividade.
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))
Parâmetros
Aplica-se a
While(Expression<Func<ActivityContext,Boolean>>)
Cria uma nova instância da While atividade.
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)))
Parâmetros
- condition
- Expression<Func<ActivityContext,Boolean>>
A condição sob a qual a atividade se itera.