public WatsonVisualRecognitionService(IHttpProxyClientService httpProxyClientService, IConfiguration configuration)
 {
     _httpProxyClientService = httpProxyClientService;
     Configuration           = configuration;
     _watsonUri = $"{Configuration["Watson:BaseUri"]}?{Configuration["Watson:Version"]}";
     _tokenUri  = Configuration["Watson:TokenUri"];
 }
Esempio n. 2
0
        public WatsonSpeechToTextService(IHttpProxyClientService httpProxyClientService, IOptions <MyConfig> config)
        {
            _httpProxyClientService = httpProxyClientService;
            _config = config;

            _username = _config.Value.WatsonUsername;
            _password = _config.Value.WatsonPassword;
        }
Esempio n. 3
0
        public WatsonTextTranslationService(IHttpProxyClientService httpProxyClientService, IOptions <MyConfig> config)
        {
            _httpProxyClientService = httpProxyClientService;
            _config = config;

            _username = _config.Value.WatsonUsernameTextTranslation;
            _password = _config.Value.WatsonPasswordTextTranslation;
        }
Esempio n. 4
0
        public AzureAuthenticationService(IHttpProxyClientService proxyClientService, IOptions <MyConfig> config)
        {
            _proxyClientService = proxyClientService;
            _config             = config;

            _subscriptionKey = _config.Value.BingSubscriptionKey;
            _token           = FetchToken(FetchTokenUri, _subscriptionKey).Result;

            // renew the token every specfied minutes
            _accessTokenRenewer = new Timer(OnTokenExpiredCallback,
                                            this,
                                            TimeSpan.FromMinutes(RefreshTokenDuration),
                                            TimeSpan.FromMilliseconds(-1));
        }
Esempio n. 5
0
 public AzureSpeechTranslatorService(IHttpProxyClientService httpProxyClientService) : this()
 {
     _httpProxyClientService = httpProxyClientService;
 }
Esempio n. 6
0
 public AwsService(IAmazonUploader amazonUploader, IAmazonTranscribeService amazonTranscribeService, IHttpProxyClientService httpProxyClientService)
 {
     _amazonUploaderService   = amazonUploader;
     _amazonTranscribeService = amazonTranscribeService;
     _httpProxyClientService  = httpProxyClientService;
 }
Esempio n. 7
0
 /// <summary>
 /// Конструктор.
 /// </summary>
 /// <param name="httpProxyClientService">Параметры proxy.</param>
 /// <param name="settingsService">Поставщик параметров.</param>
 public RssService(IHttpProxyClientService httpProxyClientService, ISettingsService settingsService)
 {
     options = settingsService.GetSettings();
     this.httpProxyClientService = httpProxyClientService;
 }
 public AzureTextTranslationService(IHttpProxyClientService httpProxyClientService, IOptions <MyConfig> config) : this()
 {
     _httpProxyClientService = httpProxyClientService;
     _config   = config;
     _azureKey = _config.Value.AzureTextTranslationKey;
 }
Esempio n. 9
0
 public BingSpeechService(IAzureAuthenticationService azureAzureAuthenticationService, IHttpProxyClientService httpProxyClientService)
 {
     _azureAuthenticationService = azureAzureAuthenticationService;
     _httpProxyClientService     = httpProxyClientService;
 }