我的目的是获得WorkItems的父和子链接类型的链接关系。
处理165 WorkItem
需要 90s ,而Microsoft的团队资源管理器仅使用 3s 来显示相同的结果。
foreach (WorkItem wi in wic) //165 count,and takes 90s to process
{
foreach(WorkItemLink wil in wi.WorkItemLinks) //I only need Parent and Child linktype
{
string linktype = wil.LinkTypeEnd.Name.ToString();
if (linktype == "Parent")
{
//some;
}
else if (linktype == "Child")
{
//some;
}
}
}