Skip to content

Application

Ian Johnson edited this page Oct 26, 2022 · 1 revision

[HardenedStartup]

One class in every library must be attributed with a [HardenedStartup] attribute. To configure the library you can add different methods.

Startup

Startup method is called after the application has started but before any requests are serviced

public async Task Startup(IServiceProvider serviceProvider)
{
  // execute startup code
}

Modules

Hardened modules can be loaded by creating a Modules method in the library entry.

public IEnumarable<IApplicationModule> Modules(IEnvironment? environment)
{
  yield return new CustomModule();
}

Clone this wiki locally