< Summary

Information
Class: Elsa.Expressions.Python.Handlers.AddInputAccessors
Assembly: Elsa.Expressions.Python
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.Python/Handlers/AddInputAccessors.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 22
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

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
HandleAsync(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Expressions.Python/Handlers/AddInputAccessors.cs

#LineLine coverage
 1using Elsa.Mediator.Contracts;
 2using Elsa.Expressions.Python.Models;
 3using Elsa.Expressions.Python.Notifications;
 4using JetBrains.Annotations;
 5
 6namespace Elsa.Expressions.Python.Handlers;
 7
 8/// <summary>
 9/// Adds input accessors to the Python engine.
 10/// </summary>
 11[UsedImplicitly]
 12public class AddInputAccessors : INotificationHandler<EvaluatingPython>
 13{
 14    /// <inheritdoc />
 15    public Task HandleAsync(EvaluatingPython notification, CancellationToken cancellationToken)
 16    {
 017        var scope = notification.Scope;
 018        var inputProxy = new InputProxy(notification.Context);
 019        scope.Set("input", inputProxy);
 020        return Task.CompletedTask;
 21    }
 22}