예제 #1
0
 /// <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);
 }
예제 #2
0
 public TypedEventForwarder(
   ITypedEventSender typedEventSender,
   IFileSystemProcessor fileSystemProcessor,
   ISearchEngine searchEngine) {
   _typedEventSender = typedEventSender;
   _fileSystemProcessor = fileSystemProcessor;
   _searchEngine = searchEngine;
 }
예제 #3
0
 /// <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);
 }
예제 #4
0
 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));
 }
예제 #5
0
 /// <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);
        }
예제 #7
0
 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);
 }
예제 #9
0
 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);
        }
예제 #11
0
        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;
 }
예제 #15
0
 public SeminarService(IBaseRepository <Seminar> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher)
 {
 }
예제 #16
0
파일: Glob.cs 프로젝트: vetterd/CSBuild
 public Glob(ISearchEngine searchEngine, IPathNormalizer pathNormalizer)
 {
     _searchEngine = searchEngine;
     _pathNormalizer = pathNormalizer;
 }
예제 #17
0
 public SystemSettingService(IBaseRepository <SystemSetting> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher)
 {
 }
예제 #18
0
 public DonateService(IBaseRepository <Donate> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher)
 {
 }
예제 #19
0
        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);
            }
        }
예제 #20
0
 public PostHistoryVersionService(IBaseRepository <PostHistoryVersion> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher)
 {
 }
예제 #21
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="searchEngine">搜索引擎</param>
 public FollowUserSearcher(ISearchEngine searchEngine)
 {
     this.searchEngine = searchEngine;
 }
예제 #22
0
 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();
 }
예제 #24
0
 public PostMergeRequestService(IBaseRepository <PostMergeRequest> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher)
 {
 }
예제 #25
0
 public InternalMessageService(IBaseRepository <InternalMessage> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher)
 {
 }
예제 #26
0
 public VariablesService(IBaseRepository <Variables> repository, ISearchEngine <DataContext> searchEngine, ILuceneIndexSearcher searcher) : base(repository, searchEngine, searcher)
 {
 }