Home > C#, TFS > TFS SDK: List the iterations

TFS SDK: List the iterations

Go to the TFS Content Page

You access the iterations via the Project’s IterationRootNodes properties.
The iterations are hierachical, you have a collection of nodes that have children.

A example that return a flat list of all iterations hierarchy:

public IList<string> GetIterationPaths(Project project)
   List<string> iterations = new List<string>();
   foreach (Node node in project.IterationRootNodes)
      AddChildren(string.Empty, node, iterations);
   return iterations;

private void AddChildren(string prefix, Node node, List<string> items)
   foreach (Node item in node.ChildNodes)
      AddChildren(prefix + node.Name + "/", item, items);
Categories: C#, TFS
  1. August 18, 2013 at 1:41 am

    Amazing! This blog looks exactly like my old one!
    It’s on a totally different subject but it has pretty much the same layout and design. Excellent choice of colors!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: