3using Microsoft.AspNetCore.Builder;
4using Microsoft.AspNetCore.Hosting;
5using Microsoft.Extensions.DependencyInjection;
6using Microsoft.Extensions.Logging;
7using Microsoft.Extensions.Options;
32 this IWebHostBuilder builder,
37 ArgumentNullException.ThrowIfNull(builder);
38 ArgumentNullException.ThrowIfNull(assemblyInformationProvider);
39 ArgumentNullException.ThrowIfNull(ioManager);
40 ArgumentNullException.ThrowIfNull(postSetupServices);
42 return builder.ConfigureServices(
43 (context, services) =>
45 var application =
new Application(context.Configuration, context.HostingEnvironment);
46 application.ConfigureServices(services, assemblyInformationProvider, ioManager, postSetupServices);
47 services.AddSingleton(application);
62 applicationBuilder.ApplicationServices.GetRequiredService<
IServerControl>(),
63 applicationBuilder.ApplicationServices.GetRequiredService<
ITokenFactory>(),
66 applicationBuilder.ApplicationServices.GetRequiredService<IOptions<ControlPanelConfiguration>>(),
67 applicationBuilder.ApplicationServices.GetRequiredService<IOptions<GeneralConfiguration>>(),
68 applicationBuilder.ApplicationServices.GetRequiredService<IOptions<SwarmConfiguration>>(),
69 applicationBuilder.ApplicationServices.GetRequiredService<IOptions<InternalConfiguration>>(),
70 applicationBuilder.ApplicationServices.GetRequiredService<ILogger<Application>>());
Sets up dependency injection.
Extension methods for the IWebHostBuilder class.
static void ConfigureApplication(IApplicationBuilder applicationBuilder)
Configures a given applicationBuilder .
static IWebHostBuilder UseApplication(this IWebHostBuilder builder, IAssemblyInformationProvider assemblyInformationProvider, IIOManager ioManager, IPostSetupServices postSetupServices)
Workaround for using the Application class for server startup.
Represents a service that may take an updated Host assembly and run it, stopping the current assembly...
Provides access to the server's HttpApiPort.
Interface for using filesystems.
For creating TokenResponses.
Set of objects needed to configure an Core.Application.