< Summary

Information
Class: Elsa.Alterations.Core.Results.RunAlterationsResult
Assembly: Elsa.Alterations.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Alterations.Core/Results/RunAlterationsResult.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 39
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
.ctor(...)100%210%
get_WorkflowInstanceId()100%210%
get_Log()100%210%
get_WorkflowHasScheduledWork()100%210%
get_IsSuccessful()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Alterations.Core/Results/RunAlterationsResult.cs

#LineLine coverage
 1using Elsa.Alterations.Core.Models;
 2using Microsoft.Extensions.Logging;
 3
 4namespace Elsa.Alterations.Core.Results;
 5
 6/// <summary>
 7/// The result of running a series of alterations.
 8/// </summary>
 9public class RunAlterationsResult
 10{
 11    /// <summary>
 12    /// Initializes a new instance of the <see cref="RunAlterationsResult"/> class.
 13    /// </summary>
 014    public RunAlterationsResult(string workflowInstanceId, AlterationLog log)
 15    {
 016        WorkflowInstanceId = workflowInstanceId;
 017        Log = log;
 018    }
 19
 20    /// <summary>
 21    /// The ID of the workflow instance that was altered.
 22    /// </summary>
 023    public string WorkflowInstanceId { get; }
 24
 25    /// <summary>
 26    /// A log of the alterations that were run.
 27    /// </summary>
 028    public AlterationLog Log { get; set; }
 29
 30    /// <summary>
 31    /// A flag indicating whether the workflow has scheduled work.
 32    /// </summary>
 033    public bool WorkflowHasScheduledWork { get; set; }
 34
 35    /// <summary>
 36    /// A flag indicating whether the alterations have succeeded.
 37    /// </summary>
 038    public bool IsSuccessful => Log.LogEntries.Any(x => x.LogLevel <= LogLevel.Warning);
 39}