< Summary

Information
Class: ArturRios.Data.Export.Exporters.MessagePackExporter<T>
Assembly: ArturRios.Data.Export
File(s): D:\Repositories\dotnet-data\src\ArturRios.Data.Export\Exporters\MessagePackExporter.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 17
Line coverage: 100%
Branch coverage
50%
Covered branches: 1
Total branches: 2
Branch coverage: 50%
Method coverage
100%
Covered methods: 2
Fully covered methods: 2
Total methods: 2
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
WriteCoreAsync(...)50%22100%

File(s)

D:\Repositories\dotnet-data\src\ArturRios.Data.Export\Exporters\MessagePackExporter.cs

#LineLine coverage
 1using ArturRios.Data.Export.Configuration;
 2using MessagePack;
 3
 4namespace ArturRios.Data.Export.Exporters;
 5
 6/// <summary>Serializes the collection to MessagePack (the binary format) using the contractless resolver.</summary>
 7/// <typeparam name="T">The record type.</typeparam>
 8/// <param name="options">MessagePack options.</param>
 49public class MessagePackExporter<T>(MessagePackOptions options) : ExporterBase<T> where T : class
 10{
 11    /// <inheritdoc />
 12    protected override Task WriteCoreAsync(IEnumerable<T> data, Stream destination, CancellationToken ct)
 213    {
 214        var array = data as T[] ?? data.ToArray();
 215        return MessagePackSerializer.SerializeAsync(destination, array, options.Effective, ct);
 216    }
 17}