WhileActivity 클래스
TOC
콘텐츠의 테이블 축소
콘텐츠의 테이블 확장

WhileActivity 클래스

Runs a child activity iteratively as long as a certain condition is true.

네임스페이스: System.Workflow.Activities
어셈블리: System.Workflow.Activities(system.workflow.activities.dll)

public sealed class WhileActivity : CompositeActivity, IActivityEventListener<ActivityExecutionStatusChangedEventArgs>
public final class WhileActivity extends CompositeActivity implements IActivityEventListener<ActivityExecutionStatusChangedEventArgs>
public final class WhileActivity extends CompositeActivity implements IActivityEventListener<ActivityExecutionStatusChangedEventArgs>
적용할 수 없음.

The WhileActivity is a CompositeActivity, meaning the WhileActivity can contain other activities.

Before each iteration, the Condition property is evaluated. If the Condition property evaluates to false, the WhileActivity immediately finishes.

The following code example demonstrates how to create a new instance of the WhileActivity class and add the ParallelActivity class to the WhileActivity class. This code example is part of the WhileAndParallel SDK Sample from the WhileAndParallelWorkflow.Designer.cs file. For more information, see Using While and Parallel.

this.WhileLoop = new System.Workflow.Activities.WhileActivity();
this.Parallel = new System.Workflow.Activities.ParallelActivity();
this.Sequence1 = new System.Workflow.Activities.SequenceActivity();
this.Sequence2 = new System.Workflow.Activities.SequenceActivity();
this.ConsoleMessage1 = new System.Workflow.Activities.CodeActivity();
this.ConsoleMessage2 = new System.Workflow.Activities.CodeActivity();
// 
// WhileLoop
// 
this.WhileLoop.Activities.Add(this.Parallel);
codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.WhileCondition);
this.WhileLoop.Condition = codecondition1;
this.WhileLoop.Name = "WhileLoop";

이 형식의 모든 public static(Visual Basic의 경우 Shared) 멤버는 스레드로부터 안전합니다. 인터페이스 멤버는 스레드로부터 안전하지 않습니다.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

Microsoft .NET Framework 3.0은 Windows Vista, Microsoft Windows XP SP2 및 Windows Server 2003 SP1에서 지원됩니다.

.NET Framework

3.0에서 지원

커뮤니티 추가 항목

추가
표시:
© 2016 Microsoft