예제 #1
0
 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);
 }
예제 #2
0
 /// <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);
예제 #3
0
 /// <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);