protected ImageSearch(string botPrefix, ImageSearchConfig config) { BotPrefix = botPrefix; Config = config; }
public BingImageSearch(string botPrefix, ImageSearchConfig config) : base(botPrefix, config) { var subscriptionKey = Environment.GetEnvironmentVariable("BING_KEY") ?? Environment.GetEnvironmentVariable($"{BotPrefix}_BING_KEY"); _client = new ImageSearchClient(new ApiKeyServiceClientCredentials(subscriptionKey)); }
public AuthenticationHeaderFactory(IRestHttpProxy restHttpProxy, IOptions <ImageSearchConfig> imageSearchConfig) { RestHttpProxy = restHttpProxy; ImageSearchConfig = imageSearchConfig.Value; }