Beispiel #1
0
        private static void CreateFactoryAndExecute(IServiceCollection services, ServiceInstallerOptions installerOptions)
        {
            var factory  = new ServiceInstallerExecutorFactory(installerOptions);
            var executor = factory.Create();

            executor.Execute(services);
        }
Beispiel #2
0
        public static IServiceCollection InstallServices(this IServiceCollection services, Action <ServiceInstallerOptions> options)
        {
            var installerOptions = new ServiceInstallerOptions();

            options(installerOptions);
            CreateFactoryAndExecute(services, installerOptions);

            return(services);
        }
 public ServiceInstallerExecutorFactory(ServiceInstallerOptions options)
 {
     _options = options;
 }