public ConfigurationSettings(ApiActionCategory apiCategory, string apiKey, LocationKeyIdentifier locationKey,
                              ApiServiceUriCollectionBase serviceUris)
 {
     if (string.IsNullOrWhiteSpace(apiKey))
     {
         throw new ArgumentException("APIKey cannot be empty");
     }
     LocationKey = locationKey;
     _apiKeys.Add(apiCategory, apiKey);
     ServiceUris       = serviceUris;
     _diagnosticLogger = new DiagnosticProxy(_registeredDiagnosticLoggers, _logLevel);
 }
示例#2
0
 public static EmotionConfigurationSettings CreateUsingConfigurationKeys(string apiKey, LocationKeyIdentifier locationKey)
 {
     return(new EmotionConfigurationSettings(apiKey, locationKey));
 }
示例#3
0
 public EmotionConfigurationSettings(string apiKey, LocationKeyIdentifier locationKey)
     : base(ApiActionCategory.Emotion, apiKey, locationKey, new ApiServiceUriCollection())
 {
 }
 public static TextAnalyticConfigurationSettings CreateUsingConfigurationKeys(string apiKey, LocationKeyIdentifier locationKey)
 {
     return(new TextAnalyticConfigurationSettings(apiKey, locationKey));
 }
 public TextAnalyticConfigurationSettings(string apiKey, LocationKeyIdentifier locationKey)
     : base(ApiActionCategory.TextAnalytics, apiKey, locationKey, new ApiServiceUriCollection())
 {
 }
示例#6
0
 public static string ToTextLocation(this LocationKeyIdentifier locationKey)
 {
     return(_locationKeyText[locationKey]);
 }