示例#1
0
        public override IEnumerable <INodeFactory> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IContext context)
        {
            List <INodeFactory> nodes = null;

            nodes = _items.ToList().ConvertAll(_adapter);
            return(nodes);
        }
        public override IEnumerable <INodeFactory> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IContext context)
        {
            var nodes = new List <INodeFactory>();

            foreach (SolutionConfiguration configuration in _solutionConfigurations)
            {
                nodes.Add(new SolutionConfigurationNodeFactory(configuration));
            }
            return(nodes);
        }
示例#3
0
        public override IEnumerable <INodeFactory> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IContext context)
        {
            var nodes = new List <INodeFactory>();

            foreach (object project in (IEnumerable)_dependency.RequiredProjects)
            {
                nodes.Add(ProjectNodeFactory.Create(project));
            }

            return(nodes);
        }
        public override IEnumerable <INodeFactory> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IContext context)
        {
            var nodes = new List <INodeFactory>();

            foreach (var name in _projects)
            {
                var project = _dte.Solution.Projects.Item(name);
                nodes.Add(ProjectNodeFactory.Create(project));
            }
            return(nodes);
        }
示例#5
0
        public override IEnumerable <INodeFactory> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IContext context)
        {
            List <INodeFactory> factories = new List <INodeFactory>();

            foreach (Configuration configuration in _project.ConfigurationManager)
            {
                var factory = new ConfigurationNodeFactory(configuration);
                factories.Add(factory);
            }
            return(factories);
        }
示例#6
0
        public override IEnumerable <INodeFactory> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IContext context)
        {
            var nodes = new List <INodeFactory>();
            var index = 0;

            foreach (SolutionContext solutionContext in _configuration.SolutionContexts)
            {
                nodes.Add(new SolutionContextNodeFactory(solutionContext, ++index));
            }
            return(nodes);
        }
        public override IEnumerable <INodeFactory> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IContext context)
        {
            List <INodeFactory> nodes = new List <INodeFactory>();

            nodes.Add(new BuildDependenciesNodeFactory(_build.BuildDependencies));
            nodes.Add(new SolutionConfigurationsNodeFactory(_build.SolutionConfigurations));
            var projectNames = _build.StartupProjects as object[];

            nodes.Add(new SolutionStartupProjectsNodeFactory((DTE2)_build.DTE, projectNames));
            return(nodes);
        }
示例#8
0
        public override IEnumerable <INodeFactory> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IContext context)
        {
            List <INodeFactory> factories = new List <INodeFactory>();

            foreach (Property p in _configuration.Properties)
            {
                var factory = new PropertyNodeFactory(p);
                factories.Add(factory);
            }
            factories.Sort((a, b) => StringComparer.InvariantCultureIgnoreCase.Compare(a.Name, b.Name));
            return(factories);
        }
示例#9
0
        public override IEnumerable <INodeFactory> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IContext context)
        {
            var nodes = new List <INodeFactory>();

            foreach (BuildDependency dependency in _buildDependencies)
            {
                var node = new BuildDependencyNodeFactory(dependency);
                nodes.Add(node);
            }

            return(nodes);
        }
示例#10
0
        public override System.Collections.Generic.IEnumerable <INodeFactory> ResolvePath(
            PowerShell.Provider.PathNodeProcessors.IContext context, string path)
        {
            path = context.SessionState.Path.GetUnresolvedProviderPathFromPSPath(path);

            var nf = PathCache.Get(path);

            if (null != nf)
            {
                return(nf);
            }

            var driveInfo = GetDriveFromPath(context, path);

            if (null == driveInfo)
            {
                context.WriteWarning(String.Format("Could not determine drive for path [{0}]", path));
                return(base.ResolvePath(context, path));
            }

            string fileOrServerPath = Regex.Replace(path, @"^[^::]+::", String.Empty);

            var re      = new Regex("^.*(" + Regex.Escape(driveInfo.Root) + ")(.*)$", RegexOptions.IgnoreCase);
            var matches = re.Match(path);

            fileOrServerPath = matches.Groups[1].Value;
            path             = matches.Groups[2].Value;

            if (File.Exists(fileOrServerPath) || Directory.Exists(fileOrServerPath))
            {
                _root = new BipsFileRootNodeFactory(driveInfo, fileOrServerPath);
            }
            else
            {
                _root = new BipsRootNodeFactory(driveInfo);
            }

            var nodes = base.ResolvePath(context, path);

            if (null == nodes || !nodes.Any())
            {
                return(nodes);
            }

            nodes = nodes.ToList();

            PathCache.Add(path, nodes);

            return(nodes);
        }
 public override IEnumerable<PowerShell.Provider.PathNodes.INodeFactory> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IContext context)
 {
     List<INodeFactory> documents = new List<INodeFactory>();
     foreach (Document document in _dte.Documents)
     {
         var node = new DocumentNodeFactory(document);
         documents.Add(node);
     }
     return documents;
 }