< Summary

Information
Class: Elsa.Http.Selectors.HeaderHttpWorkflowInstanceIdSelector
Assembly: Elsa.Http
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Selectors/HeaderHttpWorkflowInstanceIdSelector.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 16
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
GetWorkflowInstanceId(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Selectors/HeaderHttpWorkflowInstanceIdSelector.cs

#LineLine coverage
 1using Elsa.Http.Abstractions;
 2using Microsoft.AspNetCore.Http;
 3
 4namespace Elsa.Http.Selectors;
 5
 6/// <summary>
 7/// Returns the workflow instance ID from the <c>X-Workflow-Instance-ID</c> header, if any.
 8/// </summary>
 9public class HeaderHttpWorkflowInstanceIdSelector : HttpWorkflowInstanceIdSelectorBase
 10{
 11    /// <inheritdoc />
 12    protected override string? GetWorkflowInstanceId(HttpContext httpContext)
 13    {
 21514        return httpContext.Request.Headers["X-Workflow-Instance-ID"].FirstOrDefault();
 15    }
 16}