Constructs an empty WaitAndContinueList
Syntax
Visual Basic (Declaration) | |
---|
Public Function New() |
C# | |
---|
public WaitAndContinueList() |
Example
Library/Library.Test/TestWaitAndContinue.cs
C# | Copy Code |
---|
WaitAndContinueList work = new WaitAndContinueList();
SampleWork item = new SampleWork();
Assert.IsFalse(item.Disposed);
work.AddWork(item);
Assert.IsFalse(work.PerformWork(0));
item.Dispose();
Assert.IsFalse(work.PerformWork(0));
item.Completed = true;//Normally this would be set in the Dispose method of the WorkItem, but we are testing
Assert.IsFalse(work.PerformWork(0));
Assert.IsTrue(work.IsEmpty);
Assert.IsTrue(item.Disposed); |
VB.NET | Copy Code |
---|
Dim work As New WaitAndContinueList()
Dim item As New SampleWork()
Assert.IsFalse(item.Disposed)
work.AddWork(item)
Assert.IsFalse(work.PerformWork(0))
item.Dispose()
Assert.IsFalse(work.PerformWork(0))
item.Completed = True
'Normally this would be set in the Dispose method of the WorkItem, but we are testing
Assert.IsFalse(work.PerformWork(0))
Assert.IsTrue(work.IsEmpty)
Assert.IsTrue(item.Disposed) |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also