Exemplo n.º 1
0
        public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject)
        {
            var folder = (TemplateConfigFolder)dataObject;

            foreach (string file in Directory.EnumerateFiles(folder.BaseDirectory))
            {
                var node = new SystemFile(file, folder.Project);
                treeBuilder.AddChild(node);
            }

            foreach (string directory in Directory.EnumerateDirectories(folder.BaseDirectory))
            {
                var node = new TemplateConfigFolder(directory, folder.DotNetProject);
                treeBuilder.AddChild(node);
            }
        }
Exemplo n.º 2
0
        public override void BuildChildNodes(ITreeBuilder treeBuilder, object dataObject)
        {
            if (ShowingAllFiles(treeBuilder))
            {
                return;
            }

            if (!HasTemplateConfigDirectory(dataObject))
            {
                return;
            }

            var project = (DotNetProject)dataObject;

            if (project.TemplateConfigDirectoryExistsInProject())
            {
                return;
            }

            var folder = new TemplateConfigFolder(project);

            treeBuilder.AddChild(folder);
        }