Initialization and Startup¶
ExtCore initialization and startup process consists of running two extension methods:
AddExtCore and UseExtCore. These methods must be called inside the ConfigureServices and Configure methods
of the web application’s Startup class:
public void ConfigureServices(IServiceCollection services)
{
services.AddExtCore("absolute path to your extensions");
}
public void Configure(IApplicationBuilder applicationBuilder, IHostingEnvironment hostingEnvironment)
{
if (hostingEnvironment.IsDevelopment())
{
applicationBuilder.UseDeveloperExceptionPage();
applicationBuilder.UseDatabaseErrorPage();
}
applicationBuilder.UseExtCore();
}
AddExtCore Method¶
This method discovers and loads the assemblies and caches them into the
ExtensionManager class.
Then it executes code from all the extensions
inside the ConfigureServices method using the implementations of the
IConfigureServicesAction
interface.
UseExtCore Method¶
This method executes code from all the extensions
inside the Configure method using the implementations of the
IConfigureAction
interface.