本文整理汇总了C#中System.Collections.Set.Without方法的典型用法代码示例。如果您正苦于以下问题:C# Set.Without方法的具体用法?C# Set.Without怎么用?C# Set.Without使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Collections.Set
的用法示例。
在下文中一共展示了Set.Without方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAllProjects
/**
* returns a set of projects that a combine contains and a set of projects
* that are referenced from combine projects but not part of the combine
*/
void GetAllProjects (SolutionFolder folder, SolutionConfiguration config, out Set<SolutionFolderItem> projects, out Set<SolutionFolderItem> references)
{
List<SolutionFolderItem> subitems = new List<SolutionFolderItem> ();
GetSubItems (subitems, folder);
projects = (Set<SolutionFolderItem>) combineProjects [folder];
if (projects != null) {
references = (Set<SolutionFolderItem>) combineReferences [folder];
return;
}
projects = new Set<SolutionFolderItem>();
references = new Set<SolutionFolderItem>();
foreach (SolutionFolderItem item in subitems)
{
if (item is SolutionItem)
{
SolutionItem entry = (SolutionItem) item;
if (!config.BuildEnabledForItem (entry))
continue;
projects.Add (entry);
references.Union (entry.GetReferencedItems (config.Selector));
}
else if (item is SolutionFolder)
{
Set<SolutionFolderItem> subProjects;
Set<SolutionFolderItem> subReferences;
GetAllProjects ((SolutionFolder)item, config, out subProjects, out subReferences);
projects.Union (subProjects);
references.Union (subReferences);
}
}
references.Without (projects);
combineProjects [folder] = projects;
combineReferences [folder] = references;
}