iterate through workitems

Topics: CAB & Smart Client Software Factory
Sep 28, 2006 at 5:09 AM
originally posted by: wanderer1

How do you iterate (using foreach) through the workitems? In the parent workitem, I want to iterate through all the children workitems and fire some events for these workitems. Any ideas?

Sep 28, 2006 at 8:19 PM
originally posted by: marianoszklanny

One way to do it could be the following:

void IterateWIs(WorkItem workItem)
foreach (KeyValuePair<string, WorkItem> childWorkItem in workItem.WorkItems)
// do something
if (childWorkItem.Value.WorkItems.Count > 0)

Mariano Szklanny
Oct 3, 2006 at 1:55 AM
originally posted by: wanderer1

Thanks, I will try it.