public static Bootstrapper AddConfigurator <TConfigurable>( this Bootstrapper bootstrapper, Common.IConfigurator <TConfigurable> configurator) where TConfigurable : IConfigurable { _ = bootstrapper ?? throw new ArgumentNullException(nameof(bootstrapper)); bootstrapper.Configurators.Add(configurator); return(bootstrapper); }
/// <summary> /// Creates a bootstrapper with a default configuration including logging, commands, /// shortcodes, and assembly scanning while specifying an additional engine configurator. /// </summary> /// <param name="args">The command line arguments.</param> /// <param name="configurator">The engine configurator.</param> /// <returns>The bootstrapper.</returns> public static IBootstrapper CreateDefault(string[] args, Common.IConfigurator <IEngine> configurator) => Create(args).AddDefaults(configurator);
/// <summary> /// Creates a bootstrapper with a default configuration including logging, commands, /// shortcodes, and assembly scanning while specifying an additional engine configurator. /// </summary> /// <param name="args">The command line arguments.</param> /// <param name="configurator">The engine configurator.</param> /// <param name="defaultsToAdd">The default configurations to add to the bootstrapper.</param> /// <returns>The bootstrapper.</returns> public static IBootstrapper CreateDefault(string[] args, Common.IConfigurator <IEngine> configurator, DefaultsToAdd defaultsToAdd = DefaultsToAdd.All) => Create(args).AddDefaults(configurator, defaultsToAdd);