< Summary

Information
Class: Elsa.Expressions.Python.Providers.PythonExpressionDescriptorProvider
Assembly: Elsa.Expressions.Python
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.Python/Providers/PythonExpressionSyntaxProvider.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 23
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
GetDescriptors()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.Python/Providers/PythonExpressionSyntaxProvider.cs

#LineLine coverage
 1using Elsa.Expressions.Contracts;
 2using Elsa.Expressions.Models;
 3using Elsa.Extensions;
 4using Elsa.Expressions.Python.Expressions;
 5using Microsoft.Extensions.DependencyInjection;
 6
 7namespace Elsa.Expressions.Python.Providers;
 8
 9internal class PythonExpressionDescriptorProvider : IExpressionDescriptorProvider
 10{
 11    private const string TypeName = "Python";
 12
 13    public IEnumerable<ExpressionDescriptor> GetDescriptors()
 14    {
 115        yield return new()
 116        {
 117            Type = TypeName,
 118            DisplayName = "Python",
 119            Properties = new { MonacoLanguage = "python" }.ToDictionary(),
 120            HandlerFactory = ActivatorUtilities.GetServiceOrCreateInstance<PythonExpressionHandler>
 121        };
 122    }
 23}

Methods/Properties

GetDescriptors()