< Summary

Information
Class: Elsa.Common.Serialization.TypeAliasRegistry
Assembly: Elsa.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Common/Serialization/TypeAliasRegistry.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 10
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_TypeAliases()100%210%
RegisterAlias(...)100%210%
GetType(...)100%210%

File(s)

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

#LineLine coverage
 1namespace Elsa.Common.Serialization;
 2
 3public static class TypeAliasRegistry
 4{
 05    public static Dictionary<string, Type> TypeAliases { get; } = new();
 6
 07    public static void RegisterAlias(string alias, Type type) => TypeAliases[alias] = type;
 8
 09    public static Type? GetType(string alias) => TypeAliases.GetValueOrDefault(alias);
 10}