コード例 #1
0
 public WebHookNotifierSearchEventStatus(HttpClient httpClient, IOptions <SearchApiOptions> searchApiOptions,
                                         ILogger <WebHookNotifierSearchEventStatus> logger)
 {
     _httpClient       = httpClient;
     _logger           = logger;
     _searchApiOptions = searchApiOptions.Value;
 }
コード例 #2
0
        public void Should_add_a_new_webHook()
        {
            var options = new SearchApiOptions().AddWebHook("test", "http://example.com/post");

            Assert.AreEqual(1, options.WebHooks.Count);
            Assert.AreEqual("test", options.WebHooks.FirstOrDefault().Name);
            Assert.AreEqual("http://example.com/post", options.WebHooks.FirstOrDefault().Uri);
        }
コード例 #3
0
        public WebHookNotifierSearchEventStatus(HttpClient httpClient, IOptions <SearchApiOptions> searchApiOptions,
                                                ILogger <WebHookNotifierSearchEventStatus> logger, IDeepSearchService deepSearchService)
        {
            _httpClient       = httpClient;
            _logger           = logger;
            _searchApiOptions = searchApiOptions.Value;

            _deepSearchService = deepSearchService;
        }
コード例 #4
0
 public WebHookNotifierSearchEventStatus(HttpClient httpClient, IOptions <SearchApiOptions> searchApiOptions,
                                         ILogger <WebHookNotifierSearchEventStatus> logger, IDeepSearchService deepSearchService)
 {
     _httpClient         = httpClient;
     _logger             = logger;
     _searchApiOptions   = searchApiOptions.Value;
     _deepSearchService  = deepSearchService;
     _httpClient.Timeout = TimeSpan.FromMinutes(_searchApiOptions.Timeout);
 }