< Summary

Information
Class: Elsa.Workflows.Models.ActivityIncident
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/ActivityIncident.cs
Line coverage
87%
Covered lines: 14
Uncovered lines: 2
Coverable lines: 16
Total lines: 56
Line coverage: 87.5%
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%
.ctor(...)100%11100%
get_ActivityId()100%11100%
get_ActivityNodeId()100%11100%
get_ActivityType()100%11100%
get_Message()100%11100%
get_Exception()100%11100%
get_Timestamp()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/ActivityIncident.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2using Elsa.Workflows.State;
 3
 4namespace Elsa.Workflows.Models;
 5
 6/// <summary>
 7/// Holds information about an activity incident.
 8/// </summary>
 9public class ActivityIncident
 10{
 11    /// <summary>
 12    /// Initializes a new instance of the <see cref="ActivityIncident"/> class.
 13    /// </summary>
 14    [JsonConstructor]
 015    public ActivityIncident()
 16    {
 017    }
 18
 19    /// <summary>
 20    /// Initializes a new instance of the <see cref="ActivityIncident"/> class.
 21    /// </summary>
 22    /// <param name="activityId">The ID of the activity that caused the incident.</param>
 23    /// <param name="activityNodeId">The Node ID of the activity that caused the incident.</param>
 24    /// <param name="activityType">The type of the activity that caused the incident.</param>
 25    /// <param name="message">The message of the incident.</param>
 26    /// <param name="exception">The exception that caused the incident.</param>
 27    /// <param name="timestamp">The timestamp of the incident.</param>
 1528    public ActivityIncident(string activityId, string activityNodeId, string activityType, string message, ExceptionStat
 29    {
 1530        ActivityId = activityId;
 1531        ActivityNodeId = activityNodeId;
 1532        ActivityType = activityType;
 1533        Message = message;
 1534        Exception = exception;
 1535        Timestamp = timestamp;
 1536    }
 37
 38    /// <summary>The ID of the activity that caused the incident.</summary>
 2039    public string ActivityId { get; init; } = default!;
 40    /// <summary>The Node ID of the activity that caused the incident.</summary>
 2041    public string ActivityNodeId { get; init; } = default!;
 42
 43    /// <summary>The type of the activity that caused the incident.</summary>
 2044    public string ActivityType { get; init; } = default!;
 45
 46    /// <summary>The message of the incident.</summary>
 2247    public string Message { get; init; } = default!;
 48
 49    /// <summary>The exception that caused the incident.</summary>
 2650    public ExceptionState? Exception { get; init; }
 51
 52    /// <summary>
 53    /// The timestamp of the incident.
 54    /// </summary>
 2055    public DateTimeOffset Timestamp { get; init; }
 56}