/// <summary> /// Initialize a new instance of the Warden using the provided configuration. /// </summary> /// <param name="name">Customizable name of the Warden.</param> /// <param name="configuration">Configuration of Warden</param> internal Warden(string name, WardenConfiguration configuration) { if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentException("Warden name can not be empty.", nameof(name)); } if (configuration == null) { throw new ArgumentNullException(nameof(configuration), "Warden configuration has not been provided."); } Name = name; _configuration = configuration; _logger = _configuration.WardenLoggerProvider(); }
private void ApplyConfiguration() { _configuration = _configurator.Build(); _logger = _configuration.WardenLoggerProvider(); }