-
Notifications
You must be signed in to change notification settings - Fork 856
Expand file tree
/
Copy pathIPlatformStartup.cs
More file actions
47 lines (40 loc) · 1.73 KB
/
IPlatformStartup.cs
File metadata and controls
47 lines (40 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace VirtoCommerce.Platform.Core.Modularity;
/// <summary>
/// Allows modules to participate in platform startup phases before the standard IModule lifecycle.
/// Implementations are discovered via the startupType element in module.manifest.
/// </summary>
public interface IPlatformStartup
{
/// <summary>
/// Execution priority. Lower values run first.
/// Use <see cref="StartupPriority"/> constants.
/// </summary>
int Priority => StartupPriority.Default;
/// <summary>
/// Determines when <see cref="Configure"/> is called in the pipeline.
/// </summary>
PipelinePhase Phase => PipelinePhase.Initialization;
/// <summary>
/// Called during Program.cs ConfigureAppConfiguration phase.
/// Use to add configuration sources (e.g., Azure App Configuration).
/// </summary>
void ConfigureAppConfiguration(IConfigurationBuilder builder, IHostEnvironment env) { }
/// <summary>
/// Called during Program.cs ConfigureServices phase.
/// Use to register host-level services.
/// </summary>
void ConfigureHostServices(IServiceCollection services, IConfiguration config) { }
/// <summary>
/// Called during Startup.ConfigureServices after modules are loaded.
/// Use for application-level service registration.
/// </summary>
void ConfigureServices(IServiceCollection services, IConfiguration config) { }
/// <summary>
/// Called during Startup.Configure at the position determined by <see cref="Phase"/>.
/// </summary>
void Configure(IApplicationBuilder app, IConfiguration config) { }
}