| | | 1 | | using CShells.Features; |
| | | 2 | | using Elsa.Dsl.ElsaScript.Compiler; |
| | | 3 | | using Elsa.Dsl.ElsaScript.Contracts; |
| | | 4 | | using Elsa.Dsl.ElsaScript.Materializers; |
| | | 5 | | using Elsa.Dsl.ElsaScript.Parser; |
| | | 6 | | using Elsa.Workflows.Management; |
| | | 7 | | using Elsa.Platform.PackageManifest.Generator.Hints; |
| | | 8 | | using JetBrains.Annotations; |
| | | 9 | | using Microsoft.Extensions.DependencyInjection; |
| | | 10 | | |
| | | 11 | | namespace Elsa.Dsl.ElsaScript.ShellFeatures; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Feature for ElsaScript DSL support. |
| | | 15 | | /// </summary> |
| | | 16 | | [ManifestFeatureCategory("Scripting")] |
| | | 17 | | [ManifestFeatureCategory("Workflows")] |
| | | 18 | | [ShellFeature( |
| | | 19 | | DisplayName = "ElsaScript DSL", |
| | | 20 | | Description = "Provides ElsaScript DSL support for defining workflows")] |
| | | 21 | | [UsedImplicitly] |
| | | 22 | | public class ElsaScriptFeature : IShellFeature |
| | | 23 | | { |
| | | 24 | | public void ConfigureServices(IServiceCollection services) |
| | | 25 | | { |
| | 0 | 26 | | services.AddSingleton<IElsaScriptParser, ElsaScriptParser>(); |
| | 0 | 27 | | services.AddScoped<IElsaScriptCompiler, ElsaScriptCompiler>(); |
| | 0 | 28 | | services.AddScoped<IWorkflowMaterializer, ElsaScriptWorkflowMaterializer>(); |
| | 0 | 29 | | } |
| | | 30 | | } |
| | | 31 | | |