< Summary

Information
Class: IceRpc.IncomingFrameExtensions
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/IncomingFrameExtensions.cs
Tag: 275_13775359185
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 21
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
DetachPayload(...)100%11100%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/IncomingFrameExtensions.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using IceRpc.Internal;
 4using System.IO.Pipelines;
 5
 6namespace IceRpc;
 7
 8/// <summary>Provides an extension method for <see cref="IncomingFrame" /> to detach its payload.</summary>
 9public static class IncomingFrameExtensions
 10{
 11    /// <summary>Detaches the payload from the incoming frame. The caller takes ownership of the returned payload
 12    /// pipe reader, and <see cref="IncomingFrame.Payload" /> becomes invalid.</summary>
 13    /// <param name="incoming">The incoming frame.</param>
 14    /// <returns>The payload pipe reader.</returns>
 15    public static PipeReader DetachPayload(this IncomingFrame incoming)
 6816    {
 6817        PipeReader payload = incoming.Payload;
 6818        incoming.Payload = InvalidPipeReader.Instance;
 6819        return payload;
 6820    }
 21}