public MailgunEmailSender( IMailgunOptionsProvider optionsProvider, IServiceClientProvider httpClientFactory, ILogger <MailgunEmailSender> logger ) { _optionsProvider = optionsProvider; _httpClientFactory = httpClientFactory; _log = logger; }
public ElasticEmailSender( IElasticEmailOptionsProvider optionsProvider, IServiceClientProvider httpClientFactory, ILogger <ElasticEmailSender> logger ) { _optionsProvider = optionsProvider; _httpClientFactory = httpClientFactory; _log = logger; }
/// <summary> /// Calls the specified client action by creating a client instance using the specified service client provider. /// </summary> public static void Call <TChannel>(this IServiceClientProvider <TChannel> provider, Action <TChannel> action) where TChannel : class { var channel = provider.CreateChannel(); using (channel.AsDisposable()) { action(channel); } }
/// <summary> /// Calls the specified client function by creating a client instance using the specified service client provider. /// </summary> public static TResult Call <TChannel, TResult>(this IServiceClientProvider <TChannel> provider, Func <TChannel, TResult> func) where TChannel : class { var channel = provider.CreateChannel(); using (channel.AsDisposable()) { var result = func(channel); return(result); } }
public IotHubRequestBridgeNotifier(IServiceClientProvider serviceClientProvider) { _serviceClientProvider = serviceClientProvider ?? throw new ArgumentNullException(nameof(serviceClientProvider)); }