<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: TFS2010 API: Retrieving a list of Process Templates on the server.</title>
	<atom:link href="http://stuartpreston.net/blog/2009/11/07/tfs2010-api-retrieving-a-list-of-process-templates-on-the-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://stuartpreston.net/blog/2009/11/07/tfs2010-api-retrieving-a-list-of-process-templates-on-the-server/</link>
	<description>Blog of Stuart Preston</description>
	<lastBuildDate>Tue, 03 Aug 2010 15:24:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Stuart Preston</title>
		<link>http://stuartpreston.net/blog/2009/11/07/tfs2010-api-retrieving-a-list-of-process-templates-on-the-server/comment-page-1/#comment-42</link>
		<dc:creator>Stuart Preston</dc:creator>
		<pubDate>Mon, 19 Apr 2010 18:19:38 +0000</pubDate>
		<guid isPermaLink="false">http://stuartpreston.net/blog/?p=12#comment-42</guid>
		<description>Thanks Jason!</description>
		<content:encoded><![CDATA[<p>Thanks Jason!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeroen Landheer</title>
		<link>http://stuartpreston.net/blog/2009/11/07/tfs2010-api-retrieving-a-list-of-process-templates-on-the-server/comment-page-1/#comment-41</link>
		<dc:creator>Jeroen Landheer</dc:creator>
		<pubDate>Mon, 19 Apr 2010 18:17:33 +0000</pubDate>
		<guid isPermaLink="false">http://stuartpreston.net/blog/?p=12#comment-41</guid>
		<description>Thanks for the sample. Below is the version that works with RTM:

static void Main(string[] args)
    {
      //replace this with the URL to your TFS instance.
      Uri tfsUri = new Uri(&quot;&quot;);

      TfsConfigurationServer config = new TfsConfigurationServer(tfsUri, new UICredentialsProvider());
      config.EnsureAuthenticated();

      ITeamProjectCollectionService collectionService = config.GetService();
      IList collections = collectionService.GetCollections();

      foreach (TeamProjectCollection collection in collections)
      {
        if (collection.State == TeamFoundationServiceHostStatus.Started)
        {
          Console.WriteLine(String.Format(&quot;\nCollection: {0}&quot;, collection.Name));
          IProcessTemplates processTemplates = config.GetTeamProjectCollection(collection.Id).GetService();
          TemplateHeader[] templateHeaders = processTemplates.TemplateHeaders();
          foreach (TemplateHeader header in templateHeaders)
          {
            Console.WriteLine(String.Format(&quot;\t{0} \&quot;{1}\&quot;&quot;, header.TemplateId, header.Name));
          }
        }
      }

      Console.WriteLine(&quot;\nPress any key to continue.&quot;);
      Console.ReadKey();

    }

Cheers!</description>
		<content:encoded><![CDATA[<p>Thanks for the sample. Below is the version that works with RTM:</p>
<p>static void Main(string[] args)<br />
    {<br />
      //replace this with the URL to your TFS instance.<br />
      Uri tfsUri = new Uri(&#8220;&#8221;);</p>
<p>      TfsConfigurationServer config = new TfsConfigurationServer(tfsUri, new UICredentialsProvider());<br />
      config.EnsureAuthenticated();</p>
<p>      ITeamProjectCollectionService collectionService = config.GetService();<br />
      IList collections = collectionService.GetCollections();</p>
<p>      foreach (TeamProjectCollection collection in collections)<br />
      {<br />
        if (collection.State == TeamFoundationServiceHostStatus.Started)<br />
        {<br />
          Console.WriteLine(String.Format(&#8220;\nCollection: {0}&#8221;, collection.Name));<br />
          IProcessTemplates processTemplates = config.GetTeamProjectCollection(collection.Id).GetService();<br />
          TemplateHeader[] templateHeaders = processTemplates.TemplateHeaders();<br />
          foreach (TemplateHeader header in templateHeaders)<br />
          {<br />
            Console.WriteLine(String.Format(&#8220;\t{0} \&#8221;{1}\&#8221;", header.TemplateId, header.Name));<br />
          }<br />
        }<br />
      }</p>
<p>      Console.WriteLine(&#8220;\nPress any key to continue.&#8221;);<br />
      Console.ReadKey();</p>
<p>    }</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
