< Summary

Information
Class: Elsa.Resilience.Models.ResilienceStrategyConfig
Assembly: Elsa.Resilience.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Resilience.Core/Models/ResilienceStrategyConfig.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 23
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
get_Mode()100%210%
get_StrategyId()100%210%
get_Expression()100%210%
SerializeToNode()100%210%
Deserialize(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Resilience.Core/Models/ResilienceStrategyConfig.cs

#LineLine coverage
 1using System.Text.Json;
 2using System.Text.Json.Nodes;
 3using Elsa.Common.Serialization;
 4using Elsa.Expressions.Models;
 5
 6namespace Elsa.Resilience.Models;
 7
 8public class ResilienceStrategyConfig
 9{
 010    public ResilienceStrategyConfigMode Mode { get; set; }
 011    public string? StrategyId { get; set; }
 012    public Expression? Expression { get; set; }
 13
 14    public JsonNode SerializeToNode()
 15    {
 016        return JsonSerializer.SerializeToNode(this, SerializerOptions.ResilienceStrategyConfigSerializerOptions)!;
 17    }
 18
 19    public static ResilienceStrategyConfig? Deserialize(JsonNode? node)
 20    {
 021        return node.Deserialize<ResilienceStrategyConfig?>(SerializerOptions.ResilienceStrategyConfigSerializerOptions)!
 22    }
 23}