Exemplo n.º 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));
 }
Exemplo n.º 2
0
 internal Program(Options opts)
 {
     _opts         = opts;
     _searcher     = GetFileSearcher();
     _resultWriter = GetResultWriter();
     _vpus         = GetVpus();
     _atm          = new ArchiveTransferManager(_opts.Credentials, _opts.Region);
 }
        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));
        }
Exemplo n.º 4
0
 public QueryHandler(ApplicationDbContext db,
                     IConfigurationProvider config,
                     IDocumentSecurity documentSecurity,
                     IFileSearcher fileSearcher)
 {
     _db               = db;
     _config           = config;
     _documentSecurity = documentSecurity;
     _fileSearcher     = fileSearcher;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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));
        }
Exemplo n.º 7
0
 void CancelSearch()
 {
     TooManyResults = false;
     delayedSearch.Cancel();
     if (fileSearcher != null)
     {
         fileSearcher.Cancel();
         fileSearcher = null;
     }
     searchCompleted = false;
 }
Exemplo n.º 8
0
 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);
 }
 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;
 }
Exemplo n.º 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;
 }
 /// <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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 13
0
 public static void AddSearcher(string searcherId, IFileSearcher fileSearcher)
 {
     SearcherDictionary[searcherId] = fileSearcher;
 }
Exemplo n.º 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;
 }
Exemplo n.º 15
0
 public static void AddSearcher(string searcherId, IFileSearcher fileSearcher)
 {
     SearcherDictionary[searcherId] = fileSearcher;
 }
Exemplo n.º 16
0
 public FileSystemVisitor(string directoryStartPoint, IFileSearcher fileSearcher, Func <DirectoryItem, bool> filterCondition)
     : this(directoryStartPoint, fileSearcher)
 {
     _filterCondition = filterCondition;
 }
Exemplo n.º 17
0
        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>());
            }
        }
Exemplo n.º 18
0
 void CancelSearch()
 {
     TooManyResults = false;
     delayedSearch.Cancel();
     if (fileSearcher != null) {
         fileSearcher.Cancel();
         fileSearcher = null;
     }
     searchCompleted = false;
 }
Exemplo n.º 19
0
 public UserCodeLoader(IOutput output, IFileSearcher fileSearcher)
 {
     this.output       = output;
     this.fileSearcher = fileSearcher;
 }
Exemplo n.º 20
0
 public Cleaner(ISettings settings, IFileSearcher searcher, ILogger logger )
 {
     this.settings = settings;
     this.searcher = searcher;
     this.logger = logger;
 }
Exemplo n.º 21
0
 public FileSystemVisitor(string directoryStartPoint, IFileSearcher fileSearcher)
 {
     _fileSearcher        = fileSearcher;
     _directoryStartPoint = directoryStartPoint;
     _filterCondition     = null;
 }