Programing QA

Programing/Developing Questions & Answers. Focus on business application material

Get all attributes of TFS work items for specific team collection and their types

This code will get you all the attribute of work items in a specific team collection.

Your might think that you need to loop thru the properties of specific work item type, but not. the attributes are defined in team collection level and this is where we get them from.

Code Snippet
  1. // connect to TFS
  2. System.Net.NetworkCredential cre = new System.Net.NetworkCredential("username", "password", "domain");
  3. TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(TfsTeamProjectCollection.GetFullyQualifiedUriForName("http://myserver:8080/MyCollection"), cre);
  4.  
  5. // get the workitem store for selected collection
  6. WorkItemStore store = tfs.GetService<WorkItemStore>();
  7.  
  8. List<KeyValuePair<string, Type>> fields = new List<KeyValuePair<string, Type>>(); // List will hold name and type of the attribute
  9.  
  10. foreach (FieldDefinition field in store.FieldDefinitions) // loop thru all the attributes
  11. {
  12.     fields.Add(new KeyValuePair<string, Type>(field.Name, field.FieldType.GetType())); // add name and type to list.
  13. }
  • Jame Wennersten

    3/10/2015 3:56:31 AM |

    Hi! Amazing info!Working similar to this. android game is great too! Somtimes is frustrating however i suppoose may be the plot with the game.

  • Macy Lacs

    3/10/2015 9:33:21 PM |

    What a funny blog! I truly loved watching this comic video with my family unit as well as with my mates.

  • sewa mobil murah surabaya

    3/11/2015 1:20:02 PM |

    I truly appreciate this blog article.Much thanks again. Fantastic.

  • http://quickfansandlikes.com/ - instagram marketing

    3/11/2015 3:17:48 PM |

    Appreciate you sharing, great post.Much thanks again. Really Cool.

  • turkish lawyer

    3/12/2015 10:41:39 AM |

    I'll gear this review to 2 types of people: current Zune owners who are considering an upgrade, and people trying to decide between a Zune and an iPod. (There are other players worth considering out there, like the Sony Walkman X, but I hope this gives you enough info to make an informed decision of the Zune vs players other than the iPod line as well.)

  • kansas city quartz countertops

    3/13/2015 3:02:56 PM |

    Im grateful for the blog article.Really thank you! Great.

  • auto shelters portable garage

    3/14/2015 1:44:09 AM |

    I cannot thank you enough for the article.Much thanks again. Cool.

  • My Website 2015

    3/15/2015 3:53:13 AM |

    I value the blog article.Thanks Again. Awesome.

  • Gary Lazeo

    3/17/2015 7:01:37 AM |

    Say, you got a nice blog.Thanks Again.

  • rental mobil di surabaya

    3/17/2015 1:49:24 PM |

    Thank you ever so for you post. Great.

  • pop over to these guys

    3/18/2015 12:08:58 AM |

    I simply want to mention I am new to blogging and site-building and actually savored this page. Probably I’m going to bookmark your site . You definitely have incredible stories. Thanks for revealing your website.

  • wedding sarees india

    3/18/2015 5:10:51 AM |

    Out of my notice, shopping for electronic products online may be easily expensive, nevertheless there are some principles that you can use to acquire the best bargains. There are always ways to uncover discount specials that could help make one to hold the best electronic products products at the cheapest prices. Thanks for your blog post.

  • pre launch prestige north point

    3/22/2015 10:11:10 AM |

    One more thing is that while looking for a good on the internet electronics store, look for online stores that are continuously updated, always keeping up-to-date with the newest products, the very best deals, in addition to helpful information on services and products. This will ensure you are dealing with a shop that stays on top of the competition and provides you things to make knowledgeable, well-informed electronics expenditures. Thanks for the significant tips I have learned through your blog.

  • prestige pinewood

    3/22/2015 12:49:39 PM |

    Thanks for your write-up. What I want to point out is that while searching for a good on the net electronics go shopping, look for a web-site with full information on critical indicators such as the privacy statement, security details, payment methods, and other terms along with policies. Continually take time to see the help and also FAQ areas to get a far better idea of how a shop will work, what they can do for you, and in what way you can make use of the features.

  • purva city of gold

    3/24/2015 8:06:43 PM |

    Thanks for your tips about this blog. Just one thing I wish to say is the fact that purchasing electronic products items from the Internet is not new. In truth, in the past decade alone, the market for online electronics has grown substantially. Today, you could find practically almost any electronic unit and devices on the Internet, which include cameras and camcorders to computer components and gambling consoles.

  • web links

    4/6/2015 7:38:59 PM |

    very nice post, i certainly love this website, keep on it

Comments are closed