public static void Run <THostedServiceProgram, TStartup>() where THostedServiceProgram : class, IHostedService where TStartup : class, IStartup { var configurationServiceProvider = ServiceProviderHelper.GetNewEmptyServiceProvider(); HostedServiceProgram.Run <THostedServiceProgram, TStartup>(configurationServiceProvider); }
public static Task RunAsync <THostedServiceProgram, TStartup>() where THostedServiceProgram : class, IHostedService where TStartup : class, IStartup { var configurationServiceProvider = ServiceProviderHelper.GetNewEmptyServiceProvider(); var task = HostedServiceProgram.RunAsync <THostedServiceProgram, TStartup>(configurationServiceProvider); return(task); }