Ejemplo n.º 1
0
        /// <summary>
        /// Factory method for creating a new Warden instance, for which the configuration can be provided via the lambda expression.
        /// </summary>
        /// <param name="name">Name of the Warden.</param>
        /// <param name="configurator">Lambda expression to build the configuration of Warden.</param>
        /// <returns>Instance of IWarden.</returns>
        public static IWarden Create(string name, Action <WardenConfiguration.Builder> configurator)
        {
            var config = new WardenConfiguration.Builder();

            configurator?.Invoke(config);

            return(Create(name, config.Build()));
        }
Ejemplo n.º 2
0
 private void ApplyConfiguration()
 {
     _configuration = _configurator.Build();
     _logger        = _configuration.WardenLoggerProvider();
 }