< Summary

Information
Class: Elsa.Expressions.JavaScript.TypeDefinitions.Abstractions.VariableDefinitionProvider
Assembly: Elsa.Expressions.JavaScript
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/TypeDefinitions/Abstractions/VariableDefinitionProvider.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 28
Line coverage: 0%
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

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.JavaScript/TypeDefinitions/Abstractions/VariableDefinitionProvider.cs

#LineLine coverage
 1using Elsa.Expressions.JavaScript.TypeDefinitions.Builders;
 2using Elsa.Expressions.JavaScript.TypeDefinitions.Contracts;
 3using Elsa.Expressions.JavaScript.TypeDefinitions.Models;
 4
 5namespace Elsa.Expressions.JavaScript.TypeDefinitions.Abstractions;
 6
 7public abstract class VariableDefinitionProvider : IVariableDefinitionProvider
 8{
 9    protected virtual ValueTask<IEnumerable<VariableDefinition>> GetVariableDefinitionsAsync(TypeDefinitionContext conte
 10    {
 011        var variables = GetVariableDefinitions(context);
 012        return new(variables);
 13    }
 14
 15    protected virtual IEnumerable<VariableDefinition> GetVariableDefinitions(TypeDefinitionContext context)
 16    {
 017        yield break;
 18    }
 19
 020    async ValueTask<IEnumerable<VariableDefinition>> IVariableDefinitionProvider.GetVariableDefinitionsAsync(TypeDefinit
 21
 22    protected VariableDefinition CreateVariableDefinition(Action<VariableDefinitionBuilder> setup)
 23    {
 024        var builder = new VariableDefinitionBuilder();
 025        setup(builder);
 026        return builder.Build();
 27    }
 28}