quarta-feira, 10 de março de 2010

Searching for labels in Team Foundation Server - TFS

In my new work I started to dealing with TFS Version Control programming in c#, for some problems you could use the microsoft library, for others you have to use the TFS Command Line Utility both in code.

Ok, some of you could ask me what is this Team Foundation Server?

It's the server storage for the version control of the Team Foundation Suite of Microsoft. The Version Control here is a combo, composed by Server (TFS) and (TFVSC).

While Team Foundation Version Control is equivalent to Source Safe, provided by Microsoft too there are other equivalents like Tortoise Subversion, a excelent alternative for those with no money to expend in the sooooooooo expensive Microsoft set of solutions.
But in the case of Tortoise you still need a server to host your files, for example assembla.

Ok enough of this small talk! got it?

In a certain point of the tool I was developing appeared a need to query the server for all the labels of a specific folder. You could use it to get files labels too.

So let's go to method that solved the problem =D.

That's it! Ask any questions that you need....

Here you could see a deep explanation about

That's all, hope you like it.

See you next time...

2 comentários:

Victor Ramos disse...

string bla = null; // WRONG!
string bla = String.Empty // CORRECT!

hasuahsushasua

O Paulo essas horas de TFS ajudaria pra kct! hehehe

Saudades mlk!

Vitor Navarro disse...

Não vitão, realmente precisa ser nullo, além do que não existe errado em string nula. A diferença é que a string nula nao foi alocada e passar String.Empty ou "" deixa ela como vazia.
Isso faria a minha query buscar por "" e não ignorar o parâmetro.
Para ignorar o parâmetro é necessário passar null.

Ahuaehaeuhaeuh concordo com o último comentário.

Abraço