/// <summary> /// 构造函数 /// </summary> /// <param name="name">Searcher名称</param> /// <param name="indexPath">索引文件所在路径(支持"~/"及unc路径)</param> /// <param name="asQuickSearch">是否作为快捷搜索</param> /// <param name="displayOrder">显示顺序</param> public FollowUserSearcher(string name, string indexPath, bool asQuickSearch, int displayOrder) { this.Name = name; this.IndexPath = Tunynet.Utilities.WebUtility.GetPhysicalFilePath(indexPath); this.AsQuickSearch = asQuickSearch; searchEngine = SearcherFactory.GetSearchEngine(indexPath); }
public TypedEventForwarder( ITypedEventSender typedEventSender, IFileSystemProcessor fileSystemProcessor, ISearchEngine searchEngine) { _typedEventSender = typedEventSender; _fileSystemProcessor = fileSystemProcessor; _searchEngine = searchEngine; }
/// <summary> /// 构造函数 /// </summary> /// <param name="name">Searcher名称</param> /// <param name="indexPath">索引文件所在路径(支持"~/"及unc路径)</param> /// <param name="asQuickSearch">是否作为快捷搜索</param> /// <param name="displayOrder">显示顺序</param> public UserSearcher(string name, string indexPath, bool asQuickSearch, int displayOrder) { this.Name = name; this.IndexPath = WebUtility.GetPhysicalFilePath(indexPath); this.AsQuickSearch = asQuickSearch; this.DisplayOrder = displayOrder; searchEngine = SearcherFactory.GetSearchEngine(indexPath); }
public static void Initialize(TestContext context) { _container = SetupServerMefContainer(); _registry = _container.GetExportedValue<IFileSystemProcessor>(); _searchEngine = _container.GetExportedValue<ISearchEngine>(); _searchEngine.FilesLoaded += (sender, result) => _serverReadyEvent.Set(); _testFile = Utils.GetChromiumTestEnlistmentFile(); _registry.RegisterFile(new FullPath(_testFile.FullName)); }
/// <summary> /// 构造函数 /// </summary> /// <param name="name">Searcher名称</param> /// <param name="indexPath">索引文件所在路径(支持"~/"及unc路径)</param> /// <param name="asQuickSearch">是否作为快捷搜索</param> /// <param name="displayOrder">显示顺序</param> public GroupSearcher(string name, string indexPath, bool asQuickSearch, int displayOrder) { this.Name = name; this.IndexPath = Tunynet.Utilities.WebUtility.GetPhysicalFilePath(indexPath); this.AsQuickSearch = asQuickSearch; this.DisplayOrder = displayOrder; searchEngine = SearcherFactory.GetSearchEngine(indexPath); publiclyAuditStatus = auditService.GetPubliclyAuditStatus(GroupConfig.Instance().ApplicationId); }
/************************************************ * Constructors ***********************************************/ /// <summary> /// Initializes a new <see cref="BrowserViewPresenter"/> instance. /// </summary> /// <param name="view"> /// The view the presenter will control. /// </param> /// <param name="regionManager"> /// The region manager that can be used to place views. /// </param> /// <param name="searchEngine"> /// The search engine that will provide results. /// </param> public CriteriaViewPresenter(ICriteriaView view, IRegionManagerService regionManager, ISearchEngine searchEngine) { // Store locally this.view = view; this.regionManager = regionManager; this.searchEngine = searchEngine; // Subscribe to events from the view view.SearchRequested += new EventHandler(view_SearchRequested); }
public ResultadoPesquisaDocumento( ResultadosPesquisa searchResults, IList<Documento> documentos, IList<int> allContentsIdsFound, ISearchEngine searchEngine) { this.documentos = documentos; this.SearchEngine = searchEngine; this.TodosOsDocumentosIdsEncontrados = allContentsIdsFound; this.ResultadoPesquisa = searchResults; }
private static void AppendToContextMenu(ContextMenu menu, ISearchEngine engine) { var item = new MenuItem() { Header = "search on " + engine.Name, Tag = engine }; item.Click += SearchStringOnEngine_OnClick; item.SetBinding(ItemsControl.ItemsSourceProperty, new Binding("InfoView.SeriesView.Source.Names")); menu.Items.Add(item); }
public SearchService( ISearchEngine searchEngine, ISessaoDoUsuario userSession, AutorizaVisualizacaoDocumento contentAuthorizator, IDocumentoRepositorio contentRepository, IConfiguracoesDaAplicacao configuracoesDaAplicacao) { this.searchEngine = searchEngine; this.sessaoDoUsuario = userSession; this.autorizaVisualizacaoDocumento = contentAuthorizator; this.configuracoesDaAplicacao = configuracoesDaAplicacao; this.documentoRepositorio = contentRepository; }
/************************************************ * Constructors ***********************************************/ /// <summary> /// Initializes a new <see cref="BrowserViewPresenter"/> instance. /// </summary> /// <param name="view"> /// The view the presenter will control. /// </param> /// <param name="regionManager"> /// The region manager that can be used to place views. /// </param> /// <param name="searchEngine"> /// The search engine that will provide results. /// </param> public BrowserViewPresenter(IBrowserView view, IRegionManagerService regionManager, ISearchEngine searchEngine) { // Store locally this.view = view; this.regionManager = regionManager; this.searchEngine = searchEngine; // Subscribe to selection events from the view to bubble up view.SelectedResultChanged += new EventHandler(view_SelectedResultChanged); // Subscribe to search result notifications searchEngine.SearchComplete += new EventHandler<SearchCompleteEventArgs>(searchEngine_SearchComplete); }
public Application(ISearchEngine searchEngine, IProxyChecker checker, IHttpDownloaderContainer httpDownloaderContainer, IGeoIP geoIP = null, IProxyProvider proxyProvider = null, ITaskManager taskManager = null) { this.searchEngine = searchEngine; this.checker = checker; this.httpDownloaderContainer = httpDownloaderContainer; this.proxyProvider = proxyProvider ?? new ProxyProvider(); this.geoIP = geoIP ?? new TurnOffGeoIP(); this.taskManager = taskManager ?? new TaskManager(); }
public SearchFileNamesRequestHandler(ISearchEngine searchEngine, IFileSystemNameFactory fileSystemNameFactory) { _searchEngine = searchEngine; _fileSystemNameFactory = fileSystemNameFactory; }
public GetDatabaseStatisticsRequestHandler(IFileSystemProcessor processor, ISearchEngine searchEngine) { _processor = processor; _searchEngine = searchEngine; }
public GetFileExtractsRequestHandler(ISearchEngine searchEngine) { _searchEngine = searchEngine; }
public SeminarService(IBaseRepository <Seminar> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher) { }
public Glob(ISearchEngine searchEngine, IPathNormalizer pathNormalizer) { _searchEngine = searchEngine; _pathNormalizer = pathNormalizer; }
public SystemSettingService(IBaseRepository <SystemSetting> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher) { }
public DonateService(IBaseRepository <Donate> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher) { }
private async Task SearchAsyncInternal(ISearchEngine searchEngine, CancellationTokenSource cancellationTokenSource) { try { using (TaskItem task = taskManager.Create(Resources.ProxySearching)) { while (true) { task.UpdateDetails(searchEngine.Status); Uri uri = await searchEngine.GetNext(cancellationTokenSource); if (uri == null || cancellationTokenSource.IsCancellationRequested) return; task.UpdateDetails(string.Format(Resources.DownloadingFormat, uri.ToString())); string document = await GetDocumentAsyncOrNull(uri, cancellationTokenSource); if (cancellationTokenSource.IsCancellationRequested) return; if (document == null) continue; List<Proxy> proxies = await proxyProvider.ParseProxiesAsync(uri, document); if (proxies.Any()) checker.CheckAsync(proxies); } } } catch (Exception e) { SetException(e); } }
public PostHistoryVersionService(IBaseRepository <PostHistoryVersion> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher) { }
/// <summary> /// 构造函数 /// </summary> /// <param name="searchEngine">搜索引擎</param> public FollowUserSearcher(ISearchEngine searchEngine) { this.searchEngine = searchEngine; }
public LoginRecordService(IBaseRepository <LoginRecord> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher) { }
public FileTransferManager() { this.transferEngine = Factory.Instance.CreateTransferEngine(); this.searchEngine = Factory.Instance.CreateSeachEngine(); }
public PostMergeRequestService(IBaseRepository <PostMergeRequest> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher) { }
public InternalMessageService(IBaseRepository <InternalMessage> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher) { }
public VariablesService(IBaseRepository <Variables> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher) { }