0
我有这样的嵌套LinkCollection
对象,它具有Results
这是一个名单,但我无法通过此列表迭代,因为它认为这个对象作为一个对象(我100%肯定有嵌入有列表)。TFS - 如何遍历一个LinkCollection对象?
LinkCollection
这个LinkCollection
类嵌套在这个结构中Changeset[].WorkItem[].Links
- 我能够循环遍历上层类,但是在遇到Links
对象时会出现问题。
这是我的代码
public Changeset CheckForDuplicateChangeset(Changeset cs)
{
foreach (WorkItem wi in cs.WorkItems)
{
foreach (var link in wi.Links)
{
//Here I cannot access the link properties
//from the "link" within my foreach loop
}
}
//This this the property I want to access within the Links object
if (cs.WorkItems[0].Links[0].BaseType == BaseLinkType.ExternalLink)
{
}
return null;
}
完全合格的名称为Changeset
类Microsoft.TeamFoundation.Client.Changeset