public BookController(IRepository <ApplicationUser> applicationUserRepository, IRepository <Book> bookRepository, IRepository <Genre> genreRepository, IRepository <Tag> tagRepository, IRepository <Comment> commentRepository, IRepository <BookUser> bookUserRepository, IUpdateService <Book> bookUpdateService, IUpdateService <Comment> commentUpdateService, UserManager <ApplicationUser> userManager, IFactory <Comment, CommentResponseModel> commentFactory, BookDataServices dataService, IMapper objectMapper, ISearchFactory searchFactory) { this.applicationUserRepository = applicationUserRepository; this.bookRepository = bookRepository; this.genreRepository = genreRepository; this.tagRepository = tagRepository; this.bookUserRepository = bookUserRepository; this.commentRepository = commentRepository; this.bookUpdateService = bookUpdateService; this.commentUpdateService = commentUpdateService; this._userManager = userManager; this.commentFactory = commentFactory; this.dataService = dataService; this.objectMapper = objectMapper; this.searchFactory = searchFactory; }
public BlogService(ILoggerFactory loggerFactory, ISearchFactory factory) { var logger = loggerFactory.CreateLogger <BlogService>(); //创建查询客户端 search = factory.CreateSearchClient(searchIndex, logger); }
public SearchCommand(ISearchFactory factory, string cmdPath) { this.factory = factory; var builder = new CommandBuildInfo( this, Method, new CommandAttribute(cmdPath)); Command = new BotCommand(builder); }
public void TestNameSearch() { SearchCriteria sc = new SearchCriteria(); sc.SearchType = enmSearchTypes.NameSearch; sc.Name = "TextName"; ISearchFactory nameFactory = SearchFactory.GetFactory(sc.SearchType); ISearchType searchType = nameFactory.CreateSearchType(sc); List <ISearchResult> result = searchType.Search(); }
public void TestNumberSearch() { SearchCriteria sc = new SearchCriteria(); sc.SearchType = enmSearchTypes.NumberSearch; sc.IDNumber = 123456; ISearchFactory numberFactory = SearchFactory.GetFactory(sc.SearchType); ISearchType searchType = numberFactory.CreateSearchType(sc); List <ISearchResult> result = searchType.Search(); }
public SearchController(IQueryDispatcher qry, ICommandDispatcher cmd, ISearchFactory searchFactory, IValidationFactory validationFactory, IAbstractFactory abstractFactory, ILogEntropyFactory logEntropyFactory) { _qry = qry; _cmd = cmd; _searchFactory = searchFactory; _validationFactory = validationFactory; _abstractFactory = abstractFactory; _logEntropyFactory = logEntropyFactory; _hubContext = GlobalHost.ConnectionManager.GetHubContext <MessageHub>(); }
/// <summary> /// Searches with a given ISearchFactory's crawlers. /// </summary> /// <param name="searchfactory">The search factory to use.</param> /// <returns>The combined results of the searches.</returns> private List<Result> searchWith(ISearchFactory searchfactory) { ICrawler c = searchfactory.createWebCrawler(); List<Result> results = c.find(request.topic, webCount); c = searchfactory.createImageCrawler(); results.AddRange(c.find(request.topic, imageCount)); c = searchfactory.createVideoCrawler(); results.AddRange(c.find(request.topic, videoCount)); c = searchfactory.createAudioCrawler(); results.AddRange(c.find(request.topic, audioCount)); return results; }
public DoStrategyQuery(IList <SearchElement <T> > list, IQueryable <T> query, ISearchFactory factory) { if (query == null) { throw new ArgumentNullException("query"); } if (list == null) { throw new ArgumentNullException("list"); } if (factory == null) { throw new ArgumentNullException("factory"); } _list = list; _query = query; _searchFactory = factory; }
private void Window_Loaded(object sender, RoutedEventArgs e) { this.DataContext = this; InitializeComponent(); SRegistry sRegistry = new SRegistry(); SStartM sStart = new SStartM(); SServices sServices = new SServices(); ISearchFactory searchFactory = sRegistry; ISearchFactory searchFactorySt = sStart; ISearchFactory searchFactoryServ = sServices; List <ISearchFactory> ll = new List <ISearchFactory> { searchFactory, searchFactorySt, searchFactoryServ }; SearchFactoryContol searchFactoryContol = new SearchFactoryContol(ll); searchFactoryContol.observableCollection.CollectionChanged += ObservableCollection_CollectionChanged; searchFactoryContol.SecureEventHandler += SearchFactoryContol_SecureEventHandler;; searchFactoryContol.StartSearch(); }
public Registrar(IUniqueIdentifier <string, ICitizen> identitySearch, ISearchFactory factory) { _identitySearch = identitySearch; _factory = factory; _citizens = new List <ICitizen>(); }
public SearchController(ILogger <SearchController> logger, IMemoryCache memoryCache, ISearchFactory searchFactory) { _logger = logger; _memoryCache = memoryCache; _searchFactory = searchFactory; }
public HomeController(ICreateFactory iCreateFactory, ISearchFactory iSearchFactory) { _iCreateFactory = iCreateFactory; _iSearchFactory = iSearchFactory; }
public async Task Search(ISearchFactory searchFactory, Predicate <float> update) { await Execute(searchFactory.GeneralSearch, update); await Execute(searchFactory.ReferenceSearch, update); }
public async Task Search(ISearchFactory searchFactory) { await Search(searchFactory, progress => false); }