-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathStartup.cs
More file actions
51 lines (39 loc) · 2.01 KB
/
Startup.cs
File metadata and controls
51 lines (39 loc) · 2.01 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
48
49
50
51
using System.Text.Json.Serialization;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Data;
using OrchardCore.Data.Migration;
using OrchardCore.Deployment.Core;
using OrchardCore.Deployment.Deployment;
using OrchardCore.Deployment.Drivers;
using OrchardCore.Deployment.Indexes;
using OrchardCore.Deployment.Recipes;
using OrchardCore.Deployment.Steps;
using OrchardCore.DisplayManagement.Extensions;
using OrchardCore.Modules;
using OrchardCore.Navigation;
using OrchardCore.Recipes;
using OrchardCore.Security.Permissions;
namespace OrchardCore.Deployment;
public sealed class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddDeploymentServices();
services.AddNavigationProvider<AdminMenu>();
services.AddPermissionProvider<Permissions>();
services.AddSingleton<IDeploymentTargetProvider, FileDownloadDeploymentTargetProvider>();
// Register the fallback type for unknown deployment steps (e.g., when a feature is disabled).
services.AddJsonDerivedTypeFallback<DeploymentStep, UnknownDeploymentStep>();
services.AddDisplayDriver<DeploymentStep, UnknownDeploymentStepDriver>();
// Custom File deployment step
services.AddDeployment<CustomFileDeploymentSource, CustomFileDeploymentStep, CustomFileDeploymentStepDriver>();
// Recipe File deployment step
services.AddDeploymentWithoutSource<RecipeFileDeploymentStep, RecipeFileDeploymentStepDriver>();
services.AddIndexProvider<DeploymentPlanIndexProvider>();
services.AddDataMigration<Migrations>();
services.AddScoped<IDeploymentPlanService, DeploymentPlanService>();
services.AddRecipeExecutionStep<DeploymentPlansRecipeStep>();
services.AddDeployment<DeploymentPlanDeploymentSource, DeploymentPlanDeploymentStep, DeploymentPlanDeploymentStepDriver>();
services.AddDeployment<JsonRecipeDeploymentSource, JsonRecipeDeploymentStep, JsonRecipeDeploymentStepDriver>();
}
}