public override IEnumerable <IPathNode> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IProviderContext context) { var list = new List <IPathNode>(base.GetNodeChildren(context)); var results = _script.Invoke(context).ToList(); UpdateProperties(context, results); var psoResults = results.ConvertAll(CreateNode); list.AddRange(psoResults); return(list); }
public override IEnumerable <IPathNode> ResolvePath(PowerShell.Provider.PathNodeProcessors.IProviderContext context, string path) { context.WriteDebug(String.Format("Resolving path [{0}] drive [{1}]", path, context.Drive)); string filePath = Regex.Replace(path, @"^[^::]+::", String.Empty); if (null != context.Drive && !String.IsNullOrEmpty(context.Drive.Root)) { var re = new Regex("^.*(" + Regex.Escape(context.Drive.Root) + ")(.*)$", RegexOptions.IgnoreCase); var matches = re.Match(path); filePath = matches.Groups[1].Value; path = matches.Groups[2].Value;; } _rootPathNode = new ProjectRootPathNode(filePath); return(base.ResolvePath(context, path)); }
public override IEnumerable <IPathNode> GetNodeChildren(PowerShell.Provider.PathNodeProcessors.IProviderContext context) { return(_folder.Children.ToList().ConvertAll(a => ItemPathNode.Create(_drive, a))); }