public static TService UseStartupAndBuild <TService, TStartup>(this IServiceBuilder <TService> serviceBuilder, IServiceProvider configurationServiceProvider)
            where TStartup : class, IStartup
        {
            serviceBuilder.UseStartup <TStartup>(); // Bind to the startup class.

            // Now build the service using the provided
            var service = serviceBuilder.Build(configurationServiceProvider);

            return(service);
        }
        public static TService UseStartup <TStartup, TService>(this IServiceBuilder <TService> serviceBuilder, IServiceProvider configurationServiceProvider)
            where TStartup : class, IStartup
        {
            serviceBuilder.UseStartup <TStartup>();

            serviceBuilder.Build(configurationServiceProvider);

            var service = serviceBuilder.GetResult();

            return(service);
        }
Beispiel #3
0
 public void Build(IServiceBuilder builder)
 {
     builder.Build <CounterService>();
     builder.ScanThisDLL();
 }