public MessageClientImpl(ILogger <MessageClientImpl> logger, IOptions <MessageClientOptions> options)
 {
     this.logger  = logger;
     this.options = options.Value;
     this.options.ThrowIfInvalid();
 }
示例#2
0
 public static void AddMessageClient(this IServiceCollection services, IConfiguration configuration)
 {
     services.AddSingleton <IMessageClient, MessageClientImpl>();
     services.Configure <MessageClientOptions>(MessageClientOptions.From(configuration));
 }