private List <FileSystemWatcher> CreateMonitorsForAllPaths() { var watchers = new List <FileSystemWatcher>(); var paths = _expander.Expand(_configuration.MonitorRoots.Select(s => s.SourcePath)); foreach (var path in paths) { watchers.Add(new FileSystemWatcher(path) { IncludeSubdirectories = true }); } return(watchers); }
protected virtual void HandleCellGeneration() { //Build Path regions.ForEach(x => PathBuilder.BuildPath(ref x)); var test = CellCollection.cells; //Expand / Decay Cells regions.ForEach(x => { PathExpander.Expand(ref x); PathExpander.Proliferate(ref x); PathExpander.DecayCells(ref x); }); regions.ForEach(x => PathExpander.CleanIsolatedCells(x)); }
public override int Execute() { if (!Context.ContainsKey("file")) { return 0; } IList<string> files; try { var paths = new PathExpander(); var recursive = Context.ContainsKey("recursive"); files = paths.Expand(Environment.CurrentDirectory, Context["file"], recursive); } catch (InvalidPathException e) { Context.Error.WriteLine(e.Message); return 1; } if (files.Count > 0) { Task.BeforeAllExecute(); foreach (var file in files) { if (!ExecuteTask(file)) { return 1; } } Task.AfterAllExecute(); } return 0; }