public override void Setup(IVostokNetCoreApplicationBuilder builder, IVostokHostingEnvironment environment)
 => setup(builder, environment);
Example #2
0
 public static IVostokNetCoreApplicationBuilder AddHostedServiceFromApplication <TApplication>([NotNull] this IVostokNetCoreApplicationBuilder builder, [NotNull] TApplication application)
     where TApplication : class, IVostokApplication
 => builder.SetupGenericHost(b => b.ConfigureServices(services =>
 {
     services.AddSingleton(application);
     services.AddHostedService <VostokHostedService <TApplication> >();
 }));
 /// <summary>
 /// Implement this method to configure <see cref="IHostBuilder"/>.
 /// </summary>
 public abstract void Setup([NotNull] IVostokNetCoreApplicationBuilder builder, [NotNull] IVostokHostingEnvironment environment);
Example #4
0
 public static IVostokNetCoreApplicationBuilder AddHostedService <THostedService>([NotNull] this IVostokNetCoreApplicationBuilder builder)
     where THostedService : class, IHostedService
 => builder.SetupGenericHost(b => b.ConfigureServices(services => services.AddHostedService <THostedService>()));