Beispiel #1
0
 private void SetCommands(IEnumerable <AbstractCommand> commands)
 {
     //Clear old commands
     CommandTracker.DeleteCommands();
     //Set given commands
     commands.ToList().ForEach(c => CommandTracker.AddCommand(c));
 }
Beispiel #2
0
        private void RunDelete(string directory)
        {
            //create a stream of files and directories from the given root directory
            var fileStream = Iterator.Iterate(directory);

            //filter with given commands and create a stream of garbage
            var scrapStream = CommandTracker.FilterFileSystemEntityStream(fileStream);

            //clean the garbage with the given delete action
            ScrapHeap.BurnScrap(scrapStream);
        }
Beispiel #3
0
 public WorkManager(IFileSystemIterator iterator, IScrapHeap scrapHeap)
 {
     CommandTracker = new CommandTracker();
     Iterator = iterator;
     ScrapHeap = scrapHeap;
 }
Beispiel #4
0
 public WorkManager(IFileSystemIterator iterator, IScrapHeap scrapHeap)
 {
     CommandTracker = new CommandTracker();
     Iterator       = iterator;
     ScrapHeap      = scrapHeap;
 }