• 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

0.0
src/ZeroC.Slice/UuidSliceDecoderExtensions.cs
1
// Copyright (c) ZeroC, Inc.
2

3
using System.Buffers;
4

5
namespace ZeroC.Slice;
6

7
/// <summary>Provides an extension method for <see cref="SliceDecoder" /> to decode a <c>WellKnownTypes::Uuid</c> into a
8
/// <see cref="Guid" />.</summary>
9
public static class UuidSliceDecoderExtensions
10
{
11
    /// <summary>Extension methods for <see cref="SliceDecoder" />.</summary>
12
    /// <param name="decoder">The Slice decoder.</param>
13
    extension(ref SliceDecoder decoder)
14
    {
15
        /// <summary>Decodes a <c>WellKnownTypes::Uuid</c>.</summary>
16
        /// <returns>The Uuid decoded as a <see cref="Guid"/>.</returns>
17
        public Guid DecodeUuid()
18
        {
×
19
            using IMemoryOwner<byte> owner = MemoryPool<byte>.Shared.Rent(16);
×
20
            Span<byte> span = owner.Memory.Span[..16];
×
21
            decoder.CopyTo(span);
×
22
            return new Guid(span);
×
23
        }
24
    }
25
}
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