| | | 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 JetBrains.Annotations; |
| | | 8 | | using Microsoft.Extensions.DependencyInjection; |
| | | 9 | | |
| | | 10 | | namespace Elsa.Dsl.ElsaScript.ShellFeatures; |
| | | 11 | | |
| | | 12 | | /// <summary> |
| | | 13 | | /// Feature for ElsaScript DSL support. |
| | | 14 | | /// </summary> |
| | | 15 | | [ShellFeature( |
| | | 16 | | DisplayName = "ElsaScript DSL", |
| | | 17 | | Description = "Provides ElsaScript DSL support for defining workflows")] |
| | | 18 | | [UsedImplicitly] |
| | | 19 | | public class ElsaScriptFeature : IShellFeature |
| | | 20 | | { |
| | | 21 | | public void ConfigureServices(IServiceCollection services) |
| | | 22 | | { |
| | 0 | 23 | | services.AddSingleton<IElsaScriptParser, ElsaScriptParser>(); |
| | 0 | 24 | | services.AddScoped<IElsaScriptCompiler, ElsaScriptCompiler>(); |
| | 0 | 25 | | services.AddScoped<IWorkflowMaterializer, ElsaScriptWorkflowMaterializer>(); |
| | 0 | 26 | | } |
| | | 27 | | } |
| | | 28 | | |