Web/ForgeTrust.Runnable.Web/WebStartup.cs

WebStartup

Type

WebStartup

Provides a base implementation for a web-based that handles MVC, CORS, and static file configuration based on registered instances.
Method

WithOptions(Action<WebOptions>?)

Registers an optional callback to customize WebOptions and enables fluent chaining.
Method

BuildModules(StartupContext)

Collects and caches all IRunnableWebModule instances found in the provided startup context. This method is idempotent.
This method is idempotent; subsequent calls have no effect once modules are built.
Method

BuildWebOptions(StartupContext)

Initializes and caches WebOptions by applying configuration from discovered modules and the optional custom callback; enables static file support when MVC is configured for controllers with views.
This method is idempotent; subsequent calls have no effect once options are built.
Method

ConfigureServicesForAppType(StartupContext, IServiceCollection)

Configures services required for the web application: registers MVC application parts from the entry assembly and enabled web modules, and adds a CORS policy when CORS is enabled.
Method

ConfigureBuilderForAppType(StartupContext, IHostBuilder)

Configures the provided host builder with web host defaults and registers the application's web initialization pipeline.
Method

InitializeWebApplication(StartupContext, IApplicationBuilder)

Configures the application's middleware pipeline and endpoint routing for the web application.