public ExternalSearchService(IAppConfiguration config, IDiagnosticsService diagnostics, ISearchClient searchClient) { _searchClient = searchClient ?? throw new ArgumentNullException(nameof(searchClient)); Trace = diagnostics.SafeGetSource("ExternalSearchService"); }
public Server(IIOService ioService, IViewClient viewClient, IQueryClient queryClient, IQueryClient streamingQueryClient, ISearchClient searchClient, INodeAdapter nodeAdapter, ClientConfiguration clientConfiguration, ITypeTranscoder transcoder, IBucketConfig bucketConfig) { if (ioService != null) { _ioService = ioService; _ioService.ConnectionPool.Owner = this; } _nodeAdapter = nodeAdapter; _clientConfiguration = clientConfiguration; _bucketConfiguration = clientConfiguration.BucketConfigs[bucketConfig.Name]; _timingEnabled = _clientConfiguration.EnableOperationTiming; _typeTranscoder = transcoder; _bucketConfig = bucketConfig; //services that this node is responsible for IsMgmtNode = _nodeAdapter.MgmtApi > 0; IsDataNode = _nodeAdapter.KeyValue > 0; IsQueryNode = _nodeAdapter.N1QL > 0; IsIndexNode = _nodeAdapter.IndexAdmin > 0; IsViewNode = _nodeAdapter.Views > 0; IsSearchNode = _nodeAdapter.IsSearchNode; //View and query clients ViewClient = viewClient; QueryClient = queryClient; SearchClient = searchClient; _streamingQueryClient = streamingQueryClient; CachedViewBaseUri = UrlUtil.GetViewBaseUri(_nodeAdapter, _bucketConfiguration); CachedQueryBaseUri = UrlUtil.GetN1QLBaseUri(_nodeAdapter, _bucketConfiguration); if (IsDataNode || IsQueryNode) { _lastIOErrorCheckedTime = DateTime.Now; //On initialization, data nodes are authenticated, so they can start in a down state. //If the node is down immediately start the timer, otherwise disable it. if (IsDataNode) { _isDown = _ioService.ConnectionPool.InitializationFailed; } Log.InfoFormat("Initialization {0} for node {1}", _isDown ? "failed" : "succeeded", EndPoint); //timer and node status _heartBeatTimer = new Timer(_heartBeatTimer_Elapsed, null, Timeout.Infinite, Timeout.Infinite); if (_isDown) { StartHeartbeatTimer(); } } }
public SearchManager(ISearchClient client) { Client = client ?? throw new ArgumentNullException(nameof(client)); }
public YahooSearchService(ISearchClient searchClient) { _searchClient = searchClient; }
public ArchimedesSearchDialog(ISearchClient searchClient) : base(searchClient, multipleSelection: true) { }
public SearchController(ISearchClient searchClient) { _searchClient = searchClient; }
public SearchService(ISearchClient iSearchClient) { _iSearchClient = iSearchClient; }
public BooksController(IDatabaseClient databaseClient, ISearchClient searchClient) { this.databaseClient = databaseClient; this.searchClient = searchClient; }
public SearchManager(ISearchClient searchClient, ILoggerFactory loggerFactory) { _searchClient = searchClient; _logger = loggerFactory.GetLoggerForType <SearchManager>(); }
public SearchClient(string authorizationHeader, ClientConfiguration.ClientAdapter clientadapter = ClientConfiguration.ClientAdapter.Proxy) { _client = ClientAdapterFactory2.GetInstance <ISearchClient>(this.GetType(), authorizationHeader, clientadapter: clientadapter); }
public SearchClient(string authorizationHeader, IConfigProvider configProvider) { _client = ClientAdapterFactory2.GetInstance <ISearchClient>(this.GetType(), authorizationHeader, configProvider); }
/// <summary> /// /// </summary> /// <param name="srchConnectionString"></param> /// <param name="provider"></param> public QuerySuggester(string srchConnectionString) { SrchClient = new LuceneClient <QuerySuggesterDocument>(srchConnectionString); }
/// <summary> /// Initialises with the Bing search client. /// </summary> /// <param name="searchClient"></param> public ImageController(ISearchClient searchClient) { _searchClient = searchClient; }
internal static EndpointDiagnostics CreateEndpointHealth(string bucketName, DateTime createdAt, ISearchClient client, EndPoint endPoint) { return(new EndpointDiagnostics { Type = ServiceType.Search, LastActivity = CalculateLastActivity(createdAt, client.LastActivity), Remote = endPoint?.ToString() ?? UnknownEndpointValue, State = client.LastActivity.HasValue ? ServiceState.Connected : ServiceState.New, Scope = bucketName }); }
public SearchViewModel(ISearchClient searchClient) { this.searchClient = searchClient; SearchResults = new ObservableCollection <SearchResults>(); }
public TestController(ISearchClient client) { _client = client; }
public ObservableSearchClient(IGitHubClient client) { Ensure.ArgumentNotNull(client, "client"); _client = client.Search; }
public void Setup() { _searchClient = new SearchClient(_client); }
/// <summary> /// /// </summary> /// <param name="srchClient"></param> public QuerySuggester(ISearchClient <QuerySuggesterDocument> srchClient) { SrchClient = srchClient; }
public SearchService(ISearchClient searchClient, INightcrawlerClient nightcrawlerClient) { _searchClient = searchClient; _nightcrawlerClient = nightcrawlerClient; }
public Server(IIOService ioService, IViewClient viewClient, IViewClient streamingViewClient, IQueryClient queryClient, IQueryClient streamingQueryClient, ISearchClient searchClient, IAnalyticsClient analyticsClient, INodeAdapter nodeAdapter, ITypeTranscoder transcoder, ConfigContextBase context) { if (ioService != null) { _ioService = ioService; _ioService.ConnectionPool.Owner = this; } _clientConfiguration = context.ClientConfig; _bucketConfiguration = context.ClientConfig.BucketConfigs[context.BucketConfig.Name]; _timingEnabled = _clientConfiguration.EnableOperationTiming; _typeTranscoder = transcoder; //set all properties based off the nodes and nodeExt adapter LoadNodeAdapter(nodeAdapter, context.BucketConfig.Rev); //View and query clients ViewClient = viewClient; _streamingViewClient = streamingViewClient; QueryClient = queryClient; SearchClient = searchClient; _streamingQueryClient = streamingQueryClient; AnalyticsClient = analyticsClient; if (IsDataNode || IsQueryNode) { _lastIOErrorCheckedTime = DateTime.Now; //On initialization, data nodes are authenticated, so they can start in a down state. //If the node is down immediately start the timer, otherwise disable it. if (IsDataNode) { _isDown = _ioService.ConnectionPool.InitializationFailed; } Log.Info("Initialization {0} for node {1}", _isDown ? "failed" : "succeeded", EndPoint); //timer and node status _heartBeatTimer = new Timer(_heartBeatTimer_Elapsed, null, Timeout.Infinite, Timeout.Infinite); if (_isDown) { StartHeartbeatTimer(); } } }
public JobsDialog(ISearchClient searchClient, SearchQueryBuilder queryBuilder) : base(searchClient, queryBuilder, new JobStyler(), multipleSelection: true) { }
public Search(Database.Tables.SearchItem item, ApplicationUser owner) { this.Searchitem = item; _searchClient = ResolveSearchClient(Searchitem.Url); this._user = owner; }
/// <summary> /// Creates a <see cref="GitHubRepoIssueReaderWriter"/> object. This object is used to interface with GitHub to manage issues that are being migrated. /// </summary> public GitHubRepoIssueReaderWriter(string repoOwner, string repo, IIssuesClient issues, ISearchClient search) { ArgValidate.IsNotNullNotEmptyNotWhiteSpace(repoOwner, nameof(repoOwner)); ArgValidate.IsNotNullNotEmptyNotWhiteSpace(repo, nameof(repo)); ArgValidate.IsNotNull(issues, nameof(issues)); ArgValidate.IsNotNull(search, nameof(search)); this.repoOwner = repoOwner; this.repo = repo; this.issues = issues; this.search = search; }
public ExternalSearchService(IAppConfiguration config, IDiagnosticsService diagnostics, ISearchClient searchClient, IFeatureFlagService featureFlagService) { ServiceUri = config.ServiceDiscoveryUri; _searchClient = searchClient ?? throw new ArgumentNullException(nameof(searchClient)); _featureFlagService = featureFlagService ?? throw new ArgumentNullException(nameof(featureFlagService)); Trace = diagnostics.SafeGetSource("ExternalSearchService"); // Extract credentials var userInfo = ServiceUri.UserInfo; ICredentials credentials = null; if (!String.IsNullOrEmpty(userInfo)) { var split = userInfo.Split(':'); if (split.Length != 2) { throw new FormatException("Invalid user info in SearchServiceUri!"); } // Split the credentials out credentials = new NetworkCredential(split[0], split[1]); ServiceUri = new UriBuilder(ServiceUri) { UserName = null, Password = null }.Uri; } // note: intentionally not locking the next two assignments to avoid blocking calls if (_healthIndicatorStore == null) { _healthIndicatorStore = new BaseUrlHealthIndicatorStore(new AppInsightsHealthIndicatorLogger()); } if (_deprecatedSearchClient == null) { _deprecatedSearchClient = new SearchClient( ServiceUri, config.SearchServiceResourceType, credentials, _healthIndicatorStore, QuietLog.LogHandledException, new TracingHttpHandler(Trace), new CorrelatingHttpClientHandler()); } }
public DataService(ISearchClient searchClient) { _searchClient = searchClient; }
public GoogleSearchService(ISearchClient searchClient) { _searchClient = searchClient; }
public InvokeServerController(ISearchClient searchClient, ITokenManager tokenManager) { _tokenManager = tokenManager; _searchClient = searchClient; }
public IntroDialog(ISearchClient searchClient) { SetField.NotNull(out this.searchClient, nameof(searchClient), searchClient); }
public RealEstateSearchDialog(ISearchClient searchClient) : base(searchClient, multipleSelection: true) { }
public GitHubIssueRepository(ISearchClient searchClient, IIssuesClient issuesClient) { this.searchClient = searchClient; this.issuesClient = issuesClient; }