< Summary

Information
Class: Elsa.Common.Serialization.SerializerOptions
Assembly: Elsa.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Serialization/SerializerOptions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 12
Coverable lines: 12
Total lines: 26
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_CommonSerializerOptions()100%210%
.cctor()100%210%
get_ConfigurationJsonSerializerOptions()100%210%
get_LogPersistenceConfigSerializerOptions()100%210%
get_ResilienceStrategyConfigSerializerOptions()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Serialization/SerializerOptions.cs

#LineLine coverage
 1using System.Text.Json;
 2using System.Text.Json.Serialization;
 3
 4namespace Elsa.Common.Serialization;
 5
 6public static class SerializerOptions
 7{
 08    public static JsonSerializerOptions CommonSerializerOptions { get; } = new()
 09    {
 010        PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
 011        PropertyNameCaseInsensitive = true,
 012        Converters = { new JsonStringEnumConverter() }
 013    };
 14
 015    public static JsonSerializerOptions ConfigurationJsonSerializerOptions { get; } = new()
 016    {
 017        Converters = { new ConfigurationJsonConverter() }
 018    };
 19
 20    /// <summary>
 21    /// Gets the serializer options for the log persistence configuration.
 22    /// </summary>
 023    public static JsonSerializerOptions LogPersistenceConfigSerializerOptions { get; } = new(CommonSerializerOptions);
 24
 025    public static JsonSerializerOptions ResilienceStrategyConfigSerializerOptions { get; } = new(CommonSerializerOptions
 26}