testItemCollectionList

testItemCollectionList

我想把WorkItemCollection转换成List<WorkItem>,这样我就可以把它进一步转换成dictionary。这是目前为止的代码:

var testItemCollectionList = new List<WorkItem>();
WorkItemCollection testItemCollection;
Query query = new Query(project.Store, "Select [Title] From WorkItems", testResults.Select(item => item.TargetId).ToArray());
var car = query.BeginQuery();
testItemCollection = query.EndQuery(car);
testItemCollectionList = ???;
var testItemMapQuery = testItemCollectionList.ToDictionary(w => w, createItemFromQuery);

最佳答案

testItemCollectionList = (from WorkItem mItem in testItemCollection select mItem).ToList();

09-05 02:03