예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConsulServiceRegistrar"/> class.
 /// </summary>
 /// <param name="registry">the Consul service registry to use when doing registrations</param>
 /// <param name="options">configuration options to use</param>
 /// <param name="registration">the registration to register with Consul</param>
 /// <param name="logger">optional logger</param>
 public ConsulServiceRegistrar(IConsulServiceRegistry registry, ConsulDiscoveryOptions options, IConsulRegistration registration, ILogger <ConsulServiceRegistrar> logger = null)
 {
     _registry    = registry ?? throw new ArgumentNullException(nameof(registry));
     _options     = options ?? throw new ArgumentNullException(nameof(options));
     Registration = registration ?? throw new ArgumentNullException(nameof(registration));
     _logger      = logger;
 }