protected ItemFindedEventArgs OnFilteredDirectoryFinded(string directoryPath)
        {
            if (FilteredDirectoryFinded == null) return null;

            var args = new ItemFindedEventArgs(directoryPath, ItemType.Directory);
            FilteredDirectoryFinded(this, args);
            return args;
        }
        protected ItemFindedEventArgs OnFileFinded(string filePath)
        {
            if (FileFinded == null) return null;

            var args = new ItemFindedEventArgs(filePath, ItemType.File);
            FileFinded(this, args);
            return args;
        }
Exemplo n.º 3
0
 private static void FileSystemVisitorOnFileFinded(object sender, ItemFindedEventArgs args)
 {
     System.Console.WriteLine("File : { args.Path } ");
                 if (args.Path.Contains("Installer"))
                     args.ShouldStopSearch = true;
 }
 private static bool ShouldStopSearch(ItemFindedEventArgs fileFindedArgs, ItemFindedEventArgs filteredFileFindedArgs)
 {
     var stopSearch = (fileFindedArgs.ShouldStopSearch == null ? false : true) || (filteredFileFindedArgs.ShouldStopSearch == null ? false : true);
     return stopSearch;
 }
 private static bool ShouldExcludeItem(ItemFindedEventArgs fileFindedArgs, ItemFindedEventArgs filteredFileFindedArgs)
 {
     var excludeItem = (fileFindedArgs.ShouldExcludeItem == null ? false : true) || (filteredFileFindedArgs.ShouldExcludeItem == null ? false : true);
     return excludeItem;
 }