< Summary

Information
Class: ArturRios.Data.Export.Abstractions.ValueRenderer
Assembly: ArturRios.Data.Export
File(s): D:\Repositories\dotnet-data\src\ArturRios.Data.Export\Abstractions\ValueRenderer.cs
Line coverage
85%
Covered lines: 6
Uncovered lines: 1
Coverable lines: 7
Total lines: 16
Line coverage: 85.7%
Branch coverage
62%
Covered branches: 5
Total branches: 8
Branch coverage: 62.5%
Method coverage
100%
Covered methods: 1
Fully covered methods: 0
Total methods: 1
Method coverage: 100%
Full method coverage: 0%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Render(...)62.5%8885.71%

File(s)

D:\Repositories\dotnet-data\src\ArturRios.Data.Export\Abstractions\ValueRenderer.cs

#LineLine coverage
 1using System.Globalization;
 2
 3namespace ArturRios.Data.Export.Abstractions;
 4
 5/// <summary>Renders a value to a stable, culture-invariant string for columnar/text output.</summary>
 6public static class ValueRenderer
 7{
 8    /// <summary>null → empty; string → itself; <see cref="IFormattable" /> → invariant culture; otherwise <see cref="ob
 219    public static string Render(object? value) => value switch
 2110    {
 111        null => string.Empty,
 812        string s => s,
 1213        IFormattable f => f.ToString(null, CultureInfo.InvariantCulture),
 014        _ => value.ToString() ?? string.Empty
 2115    };
 16}

Methods/Properties

Render(System.Object)