コード例 #1
0
 public PackageTransformer(IFileSearcher fileSearcher, IFileSystem fileSystem, IFileTransformerFactory fileTransformerFactory, IPackageHandlerLoader packageHandlerLoader)
 {
     this.FileSearcher           = fileSearcher ?? throw new ArgumentNullException(nameof(fileSearcher));
     this.FileSystem             = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
     this.FileTransformerFactory = fileTransformerFactory ?? throw new ArgumentNullException(nameof(fileTransformerFactory));
     this.PackageHandlerLoader   = packageHandlerLoader ?? throw new ArgumentNullException(nameof(packageHandlerLoader));
 }
コード例 #2
0
 internal Program(Options opts)
 {
     _opts         = opts;
     _searcher     = GetFileSearcher();
     _resultWriter = GetResultWriter();
     _vpus         = GetVpus();
     _atm          = new ArchiveTransferManager(_opts.Credentials, _opts.Region);
 }
コード例 #3
0
        public AudioCopyViewModel(IFileSearcher fileSearcher, IDispatcherWrapper dispatcher, IRandomAudioFileSelector randomFileSelector, ISerializationHelper serializationHelper, IDialogService dialogService, IOpenerHelper openerHelper, IConfigurationHelper configurationHelper)
            : base(fileSearcher ?? new FileSearcher(), dispatcher ?? new DispatcherWrapper(), serializationHelper ?? new SerializationHelper(), dialogService ?? new DialogService(), openerHelper ?? new OpenerHelper(), configurationHelper ?? new ConfigurationHelper())
        {
            _randomAudioFileSelector = randomFileSelector ?? new RandomAudioFileSelector();
            SelectionModel           = new SelectionModel(0, 350, UnitSize.MB);
            var settings = ConfigurationHelper.GetExtensions(ExtensionsAppsettingKey.AudioExtensions);

            AudioExtensions = new ObservableCollection <string>(settings.Select(x => x.Extension));
            Model           = new AudioSourceDestinationModel(settings.Where(x => x.DefaultSelected).Select(x => x.Extension));
        }
コード例 #4
0
 public QueryHandler(ApplicationDbContext db,
                     IConfigurationProvider config,
                     IDocumentSecurity documentSecurity,
                     IFileSearcher fileSearcher)
 {
     _db               = db;
     _config           = config;
     _documentSecurity = documentSecurity;
     _fileSearcher     = fileSearcher;
 }
コード例 #5
0
 public RenderTemplatesCommand(IErrorList errorList, IOutput output, IFileReaderWriter fileReaderWriter, ISourceControl sourceControl, IStatus status, ISolutionItemsManager solutionItemsManager, IFileSearcher fileSearcher)
 {
     this.errorList            = errorList;
     this.output               = output;
     this.fileReaderWriter     = fileReaderWriter;
     this.sourceControl        = sourceControl;
     this.status               = status;
     this.solutionItemsManager = solutionItemsManager;
     this.fileSearcher         = fileSearcher;
 }
コード例 #6
0
        public VideoCopyViewModel(IFileSearcher fileSearcher, IVideoFileRepresenterFactory videoFileRepresenterFactory, IDispatcherWrapper dispatcher, IRandomVideoFileSelector randomFileSelector, ISerializationHelper serializationHelper, IDialogService dialogService, IOpenerHelper openerHelper, IConfigurationHelper configurationHelper)
            : base(fileSearcher ?? new FileSearcher(), dispatcher ?? new DispatcherWrapper(), serializationHelper ?? new SerializationHelper(), dialogService ?? new DialogService(), openerHelper ?? new OpenerHelper(), configurationHelper ?? new ConfigurationHelper())
        {
            _fileRepresenterFactory = videoFileRepresenterFactory ?? new VideoFileRepresenterFactory();
            _randomFileSelector     = randomFileSelector ?? new RandomVideoFileSelector();
            SelectionModel          = new VideoSelectionModel(0, 10);
            var settings = ConfigurationHelper.GetExtensions(ExtensionsAppsettingKey.VideoExtensions);

            VideoExtensions = new ObservableCollection <string>(settings.Select(x => x.Extension));
            Model           = new VideoSourceDestinationModel(settings.Where(x => x.DefaultSelected).Select(x => x.Extension));
        }
コード例 #7
0
ファイル: SearchControlVM.cs プロジェクト: rdavydov/dnSpy
 void CancelSearch()
 {
     TooManyResults = false;
     delayedSearch.Cancel();
     if (fileSearcher != null)
     {
         fileSearcher.Cancel();
         fileSearcher = null;
     }
     searchCompleted = false;
 }
コード例 #8
0
ファイル: Renamer.cs プロジェクト: jhofer/AutoRenamer
 public Renamer()
 {
     this.logger = new Logger();
     this.settings = new Settings(logger);
     this.fileSearcher = new FileSearcher(settings, logger);
     this.movieFileBot = new FileBot(settings, logger, true);
     this.seriesFileBot = new FileBot(settings, logger, false);
     this.cleaner = new Cleaner(settings, fileSearcher, logger);
     this.pathGenerator = new PathGenerator();
     this.fileMover = new FileMover(logger);
     this.cleaner = new Cleaner(settings, fileSearcher, logger);
     this.archiver = new Archiver(settings, fileMover);
 }
コード例 #9
0
 public FileSearcherForm()
 {
     InitializeComponent();
     prbSearchingProgress.Minimum = 0;
     prbSearchingProgress.Maximum = 100;
     prbSearchingProgress.Visible = false;
     btnStop.Enabled = false;
     lblResult.Text = string.Empty;
     SetContextMenu();
     _fileSearcher = new FileSearcher();
     _timer = new Timer();
     _timer.Interval = 500;
     _timer.Tick += _timer_Tick;
 }
コード例 #10
0
 public FileSearcherForm()
 {
     InitializeComponent();
     prbSearchingProgress.Minimum = 0;
     prbSearchingProgress.Maximum = 100;
     prbSearchingProgress.Visible = false;
     btnStop.Enabled = false;
     lblResult.Text  = string.Empty;
     SetContextMenu();
     _fileSearcher   = new FileSearcher();
     _timer          = new Timer();
     _timer.Interval = 500;
     _timer.Tick    += _timer_Tick;
 }
コード例 #11
0
 /// <summary>
 ///     Конструктор класса.
 /// </summary>
 /// <param name="sourceValidator">Распознаватель источников по пути.</param>
 /// <param name="sourceStorage">Хранилище с источниками.</param>
 /// <param name="indexChecker">Валидатор индекса под логику анализа.</param>
 /// <param name="fileInformationExtractor">Вытаскиватель данных о файлах.</param>
 /// <param name="indexedCache">Кэш данных по индексам.</param>
 /// <param name="fileSearcher">Поисковик имен всех файлов в источников.</param>
 public SimpleIndexingService(
     ISourceValidator sourceValidator,
     ISourceStorage sourceStorage,
     IIndexChecker indexChecker,
     IFileInformationExtractor fileInformationExtractor,
     IIndexedCache indexedCache,
     IFileSearcher fileSearcher)
 {
     this.sourceValidator = sourceValidator;
     this.sourceStorage = sourceStorage;
     this.indexChecker = indexChecker;
     this.fileInformationExtractor = fileInformationExtractor;
     this.indexedCache = indexedCache;
     this.fileSearcher = fileSearcher;
 }
コード例 #12
0
 public VirtualTemplatesController(
     IVirtualTemplateRepository viewPersistenceService
     , LocalizationService localizationService
     , IUiTemplateLister uITemplateLister
     , IPhysicalFileReader physicalFileReader
     , IVirtualTemplateVersionRepository versionRepository
     , IFileSearcher templateSearcher
     , IProfileHelper profileHelper,
     ITemplateComparer templateComparer)
 {
     _viewPersistenceService = viewPersistenceService;
     _localizationService    = localizationService;
     _uITemplateLister       = uITemplateLister;
     _fileReader             = physicalFileReader;
     _versionRepository      = versionRepository;
     _templateSearcher       = templateSearcher;
     _profileHelper          = profileHelper;
     _templateComparer       = templateComparer;
 }
コード例 #13
0
 public static void AddSearcher(string searcherId, IFileSearcher fileSearcher)
 {
     SearcherDictionary[searcherId] = fileSearcher;
 }
コード例 #14
0
 public FileCopyViewModel(IFileSearcher fileSearcher, IDispatcherWrapper dispatcher, ISerializationHelper serializationHelper, IDialogService dialogService, IOpenerHelper openerHelper, IConfigurationHelper configurationHelper)
     : base(dispatcher, serializationHelper, dialogService, openerHelper)
 {
     FileSearcher        = fileSearcher;
     ConfigurationHelper = configurationHelper;
 }
コード例 #15
0
 public static void AddSearcher(string searcherId, IFileSearcher fileSearcher)
 {
     SearcherDictionary[searcherId] = fileSearcher;
 }
コード例 #16
0
 public FileSystemVisitor(string directoryStartPoint, IFileSearcher fileSearcher, Func <DirectoryItem, bool> filterCondition)
     : this(directoryStartPoint, fileSearcher)
 {
     _filterCondition = filterCondition;
 }
コード例 #17
0
ファイル: SearchControlVM.cs プロジェクト: lovebanyi/dnSpy
        void StartSearch()
        {
            if (!CanSearch) {
                Clear();
                return;
            }

            CancelSearch();
            if (string.IsNullOrEmpty(SearchText))
                SearchResults.Clear();
            else {
                var options = new FileSearcherOptions {
                    SearchComparer = CreateSearchComparer(),
                    Filter = new FlagsFileTreeNodeFilter(selectedSearchTypeVM.Flags),
                    SearchDecompiledData = SearchDecompiledData,
                };
                fileSearcher = fileSearcherCreator.Create(options);
                fileSearcher.SyntaxHighlight = SyntaxHighlight;
                fileSearcher.Language = Language;
                fileSearcher.BackgroundType = BackgroundType;
                fileSearcher.OnSearchCompleted += FileSearcher_OnSearchCompleted;
                fileSearcher.OnNewSearchResults += FileSearcher_OnNewSearchResults;
                fileSearcher.Start(fileTreeView.TreeView.Root.DataChildren.OfType<IDnSpyFileNode>());
            }
        }
コード例 #18
0
ファイル: SearchControlVM.cs プロジェクト: lovebanyi/dnSpy
 void CancelSearch()
 {
     TooManyResults = false;
     delayedSearch.Cancel();
     if (fileSearcher != null) {
         fileSearcher.Cancel();
         fileSearcher = null;
     }
     searchCompleted = false;
 }
コード例 #19
0
ファイル: UserCodeLoader.cs プロジェクト: NeVeSpl/NTypewriter
 public UserCodeLoader(IOutput output, IFileSearcher fileSearcher)
 {
     this.output       = output;
     this.fileSearcher = fileSearcher;
 }
コード例 #20
0
ファイル: Cleaner.cs プロジェクト: jhofer/AutoRenamer
 public Cleaner(ISettings settings, IFileSearcher searcher, ILogger logger )
 {
     this.settings = settings;
     this.searcher = searcher;
     this.logger = logger;
 }
コード例 #21
0
 public FileSystemVisitor(string directoryStartPoint, IFileSearcher fileSearcher)
 {
     _fileSearcher        = fileSearcher;
     _directoryStartPoint = directoryStartPoint;
     _filterCondition     = null;
 }