< Summary

Information
Class: Elsa.Api.Client.Serialization.SerializerOptions
Assembly: Elsa.Api.Client
File(s): /home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Serialization/SerializerOptions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 8
Coverable lines: 8
Total lines: 24
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_LogPersistenceConfigSerializerOptions()100%210%
get_ResilienceStrategyConfigSerializerOptions()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Serialization/SerializerOptions.cs

#LineLine coverage
 1using System.Text.Json;
 2using System.Text.Json.Serialization;
 3
 4namespace Elsa.Api.Client.Serialization;
 5
 6/// <summary>
 7/// Provides options for serializing and deserializing objects.
 8/// </summary>
 9public static class SerializerOptions
 10{
 011    public static JsonSerializerOptions CommonSerializerOptions { get; } = new()
 012    {
 013        PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
 014        PropertyNameCaseInsensitive = true,
 015        Converters = { new JsonStringEnumConverter() }
 016    };
 17
 18    /// <summary>
 19    /// Gets the serializer options for the log persistence configuration.
 20    /// </summary>
 021    public static JsonSerializerOptions LogPersistenceConfigSerializerOptions { get; } = new(CommonSerializerOptions);
 22
 023    public static JsonSerializerOptions ResilienceStrategyConfigSerializerOptions { get; } = new(CommonSerializerOptions
 24}