< Summary

Information
Class: ZeroC.Slice.DurationSliceDecoderExtensions
Assembly: ZeroC.Slice
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/ZeroC.Slice/DurationSliceDecoderExtensions.cs
Tag: 275_13775359185
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 13
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 1
Total methods: 1
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
DecodeDuration(...)100%11100%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/ZeroC.Slice/DurationSliceDecoderExtensions.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3namespace ZeroC.Slice;
 4
 5/// <summary>Provides an extension method for <see cref="SliceDecoder" /> to decode a <c>WellKnownTypes::Duration</c>
 6/// into a <see cref="TimeSpan"/>.</summary>
 7public static class DurationSliceDecoderExtensions
 8{
 9    /// <summary>Decodes a duration.</summary>
 10    /// <param name="decoder">The Slice decoder.</param>
 11    /// <returns>The duration decoded as a <see cref="TimeSpan"/>.</returns>
 812    public static TimeSpan DecodeDuration(this ref SliceDecoder decoder) => new(decoder.DecodeVarInt62());
 13}