< Summary

Information
Class: Elsa.Workflows.Api.Endpoints.Shells.ShellReloadItemResponse
Assembly: Elsa.Workflows.Api
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Api/Endpoints/Shells/ShellsResponseModels.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 33
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
get_ShellId()100%11100%
get_Outcome()100%11100%
get_Requested()100%11100%
get_Message()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Api/Endpoints/Shells/ShellsResponseModels.cs

#LineLine coverage
 1using Elsa.Workflows.Api.Contracts;
 2
 3namespace Elsa.Workflows.Api.Endpoints.Shells;
 4
 5internal class ShellReloadResponse
 6{
 7    public ShellReloadStatus Status { get; init; }
 8    public string? RequestedShellId { get; init; }
 9    public DateTimeOffset ReloadedAt { get; init; }
 10    public IReadOnlyCollection<ShellReloadItemResponse> Shells { get; init; } = [];
 11
 12    public static ShellReloadResponse FromResult(ShellReloadResult result) => new()
 13    {
 14        Status = result.Status,
 15        RequestedShellId = result.RequestedShellId,
 16        ReloadedAt = result.ReloadedAt,
 17        Shells = result.Shells.Select(x => new ShellReloadItemResponse
 18        {
 19            ShellId = x.ShellId,
 20            Outcome = x.Outcome,
 21            Requested = x.Requested,
 22            Message = x.Message
 23        }).ToArray()
 24    };
 25}
 26
 27internal class ShellReloadItemResponse
 28{
 2029    public string ShellId { get; init; } = default!;
 2030    public ShellReloadItemOutcome Outcome { get; init; }
 2031    public bool Requested { get; init; }
 2032    public string? Message { get; init; }
 33}