< Summary

Information
Class: IceRpc.IncomingFrame
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/IncomingFrame.cs
Tag: 275_13775359185
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 36
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 4
Total methods: 4
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_ConnectionContext()100%11100%
get_Payload()100%11100%
get_Protocol()100%11100%
.ctor(...)100%11100%

File(s)

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

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using IceRpc.Internal;
 4using System.IO.Pipelines;
 5
 6namespace IceRpc;
 7
 8/// <summary>Represents the base class for incoming frames.</summary>
 9public class IncomingFrame
 10{
 11    /// <summary>Gets or sets the connection context.</summary>
 12    /// <value>The <see cref="IConnectionContext"/> of this frame.</value>
 1131213    public IConnectionContext ConnectionContext { get; set; }
 14
 15    /// <summary>Gets or sets the payload of this frame.</summary>
 16    /// <value>The payload of this frame. Defaults to a <see cref="PipeReader" /> that returns an empty sequence.
 17    /// </value>
 18    /// <remarks>IceRPC completes the payload <see cref="PipeReader" /> with the <see
 19    /// cref="PipeReader.Complete(Exception?)" /> method. It never calls <see
 20    /// cref="PipeReader.CompleteAsync(Exception?)" />. The implementation of <see
 21    /// cref="PipeReader.Complete(Exception?)" /> should not block.</remarks>
 3326522    public PipeReader Payload { get; set; } = EmptyPipeReader.Instance;
 23
 24    /// <summary>Gets the protocol of this frame.</summary>
 25    /// <value>The <see cref="IceRpc.Protocol" /> of this frame.</value>
 839626    public Protocol Protocol { get; }
 27
 28    /// <summary>Constructs an incoming frame.</summary>
 29    /// <param name="protocol">The protocol of this frame.</param>
 30    /// <param name="connectionContext">The connection context of the connection that received this frame.</param>
 1124231    private protected IncomingFrame(Protocol protocol, IConnectionContext connectionContext)
 1124232    {
 1124233        ConnectionContext = connectionContext;
 1124234        Protocol = protocol;
 1124235    }
 36}