| | | 1 | | using CShells.Features; |
| | | 2 | | using Elsa.Platform.Integration.Options; |
| | | 3 | | using Elsa.Platform.Integration.Services; |
| | | 4 | | using Elsa.Platform.PackageManifest.Generator.Hints; |
| | | 5 | | using Elsa.Workflows.Management.ShellFeatures; |
| | | 6 | | using JetBrains.Annotations; |
| | | 7 | | using Microsoft.Extensions.DependencyInjection; |
| | | 8 | | |
| | | 9 | | namespace Elsa.Platform.Integration.ShellFeatures; |
| | | 10 | | |
| | | 11 | | [ManifestFeatureCategory("Integrations")] |
| | | 12 | | [ShellFeature( |
| | | 13 | | DisplayName = "Elsa Platform Integration", |
| | | 14 | | Description = "Polls Elsa Platform deployment commands and applies Loom recipe artifacts to this Elsa runtime", |
| | | 15 | | DependsOn = [typeof(WorkflowManagementFeature)])] |
| | | 16 | | [UsedImplicitly] |
| | | 17 | | public class ElsaPlatformIntegrationFeature : IShellFeature |
| | | 18 | | { |
| | | 19 | | public void ConfigureServices(IServiceCollection services) |
| | | 20 | | { |
| | 0 | 21 | | services.AddOptions<ElsaPlatformIntegrationOptions>() |
| | 0 | 22 | | .BindConfiguration(ElsaPlatformIntegrationOptions.ConfigurationSection); |
| | | 23 | | |
| | 0 | 24 | | services.AddHttpClient<IPlatformRuntimeCommandClient, PlatformRuntimeCommandClient>(); |
| | 0 | 25 | | services.AddSingleton<IShellConfigurationOverlayStore, FileShellConfigurationOverlayStore>(); |
| | 0 | 26 | | services.AddScoped<IPlatformRecipeArtifactApplier, ElsaLoomRecipeArtifactApplier>(); |
| | 0 | 27 | | services.AddHostedService<ElsaPlatformDeploymentWorker>(); |
| | 0 | 28 | | } |
| | | 29 | | } |