| | | 1 | | using Elsa.Dsl.ElsaScript.Compiler; |
| | | 2 | | using Elsa.Dsl.ElsaScript.Contracts; |
| | | 3 | | using Elsa.Dsl.ElsaScript.Materializers; |
| | | 4 | | using Elsa.Dsl.ElsaScript.Parser; |
| | | 5 | | using Elsa.Features.Abstractions; |
| | | 6 | | using Elsa.Features.Services; |
| | | 7 | | using Elsa.Workflows.Management; |
| | | 8 | | using Microsoft.Extensions.DependencyInjection; |
| | | 9 | | |
| | | 10 | | namespace Elsa.Dsl.ElsaScript.Features; |
| | | 11 | | |
| | | 12 | | /// <summary> |
| | | 13 | | /// Feature for ElsaScript DSL support. |
| | | 14 | | /// </summary> |
| | | 15 | | public class ElsaScriptFeature : FeatureBase |
| | | 16 | | { |
| | | 17 | | /// <inheritdoc /> |
| | 24 | 18 | | public ElsaScriptFeature(IModule module) : base(module) |
| | | 19 | | { |
| | 24 | 20 | | } |
| | | 21 | | |
| | | 22 | | /// <inheritdoc /> |
| | | 23 | | public override void Configure() |
| | | 24 | | { |
| | | 25 | | // No additional configuration needed |
| | 24 | 26 | | } |
| | | 27 | | |
| | | 28 | | /// <inheritdoc /> |
| | | 29 | | public override void Apply() |
| | | 30 | | { |
| | 24 | 31 | | Services.AddSingleton<IElsaScriptParser, ElsaScriptParser>(); |
| | 24 | 32 | | Services.AddScoped<IElsaScriptCompiler, ElsaScriptCompiler>(); |
| | 24 | 33 | | Services.AddScoped<IWorkflowMaterializer, ElsaScriptWorkflowMaterializer>(); |
| | 24 | 34 | | } |
| | | 35 | | } |