Team Foundation Server 2010 API

JBo*_*one 5 .net c# tfs

我想知道是否有人知道一个好的网站显示使用TFS 2010的API的例子.

我想开发一个项目,允许团队查看其他团队成员已签出的文件/项目.它只是一个系统用户可以看到开发人员目前正在开发哪些项目.有没有人有这方面的经验,可以提供入门建议?

我将在.NET(C#OR VB)中开发,应用程序将使用SQL Server 2008数据库.

Edw*_*son 6

正如Alex提到的那样,Attrice的TFS Sidekicks具有此功能.

此外,TFS Power Tools允许您使用"在源代码管理中查找"来查看由任何(或所有)用户签出的文件.

但是,如果您确实想要推出自己的解决方案,则可以使用TFS SDK轻松完成.我会让文档说明一切,但你可能想要做一些事情:

TfsTeamProjectCollection projectCollection = new TfsTeamProjectCollection(new Uri("http://tfs.mycompany.com:8080/tfs/DefaultCollection"));
VersionControlServer vc = projectCollection.GetService<VersionControlServer>();

/* Get all pending changesets for all items (note, you can filter the items in the first arg.) */
PendingSet[] pendingSets = vc.GetPendingSets(null, RecursionType.Full);

foreach(PendingSet set in pendingSets)
{
    /* Get each item in the pending changeset */
    foreach(PendingChange pc in set.PendingChanges)
    {
        Console.WriteLine(pc.ServerItem + " is checked out by " + set.OwnerName);
    }
}
Run Code Online (Sandbox Code Playgroud)

(注意:完全未经测试)

但同样,我建议您查看这两个现有项目,看看它们是否符合您的需求.