• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

icerpc / icerpc-csharp / 20870171951

10 Jan 2026 01:03AM UTC coverage: 83.304% (-0.1%) from 83.399%
20870171951

Pull #4221

github

web-flow
Merge fe4f556d8 into f39e9819d
Pull Request #4221: Use new C#14 extension block syntax

12030 of 14441 relevant lines covered (83.3%)

2957.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.14
src/ZeroC.Slice/TimeStampSliceDecoderExtensions.cs
1
// Copyright (c) ZeroC, Inc.
2

3
namespace ZeroC.Slice;
4

5
/// <summary>Provides an extension method for <see cref="SliceDecoder" /> to decode a
6
/// <c>WellKnownTypes::TimeStamp</c> into a <see cref="DateTime" />.</summary>
7
public static class TimeStampSliceDecoderExtensions
8
{
9
    /// <summary>Extension methods for <see cref="SliceDecoder" />.</summary>
10
    /// <param name="decoder">The Slice decoder.</param>
11
    extension(ref SliceDecoder decoder)
12
    {
13
        /// <summary>Decodes a time stamp.</summary>
14
        /// <returns>The time stamp decoded as a <see cref="DateTime"/>.</returns>
15
        public DateTime DecodeTimeStamp()
16
        {
36✔
17
            long value = decoder.DecodeInt64();
36✔
18
            try
19
            {
36✔
20
                return new DateTime(value, DateTimeKind.Utc);
36✔
21
            }
22
            catch (ArgumentOutOfRangeException exception)
×
23
            {
×
24
                throw new InvalidDataException(message: null, exception);
×
25
            }
26
        }
27
    }
28
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc