< Summary

Information
Class: Elsa.Dsl.ElsaScript.Features.ElsaScriptFeature
Assembly: Elsa.Dsl.ElsaScript
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Dsl.ElsaScript/Features/ElsaScriptFeature.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 35
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
Configure()100%11100%
Apply()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Dsl.ElsaScript/Features/ElsaScriptFeature.cs

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