迭代Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem'链接属性很慢

时间:2013-03-25 01:51:10

标签: c# tfs processing-efficiency

我的目的是获得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;  
        }  
    }  
}  

0 个答案:

没有答案