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