protected Collection <BaseNode> AddFiles(ref List <string> filenames, CollectionWrapper <BuildFileWrapper, MFBuildFile> files, string path) { List <BaseNode> items = new List <BaseNode>(); foreach (BuildFileWrapper file in files) { BuildFileNode fileNode = new BuildFileNode(file, this, path); if (filenames.Contains(fileNode.TypedContent.FullPath) == false) { items.Add(fileNode); filenames.Add(file.FullPath); } } return(new Collection <BaseNode>(items)); }
public override Collection <BaseNode> GetChildren(TreePath treePath) { List <BaseNode> items = new List <BaseNode>(); List <string> filenames = new List <string>(); foreach (BuildFileWrapper file in this.Wrappers) { BuildFileNode fileNode = new BuildFileNode(file, this, this.Path); if (filenames.Contains(fileNode.TypedContent.FullPath) == false) { items.Add(fileNode); filenames.Add(file.FullPath); } } items.Sort(new NodeComparer()); return(new Collection <BaseNode>(items)); }