CSharpTest.Net
WaitAndContinueList Class
Members  Example  See Also  Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Threading Namespace : WaitAndContinueList Class

Glossary Item Box

Represents a set of queued IWorkAndContinue items that can be processed

Syntax

Visual Basic (Declaration) 
Public Class WaitAndContinueList 
C# 
public class 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.NETCopy 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)

Inheritance Hierarchy

System.Object
   CSharpTest.Net.Threading.WaitAndContinueList

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys