< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Channels.ReplyChannel
Assembly: CoreWCF.NetFramingBase
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.NetFramingBase/src/CoreWCF/Channels/ReplyChannel.cs
Line coverage
61%
Covered lines: 8
Uncovered lines: 5
Coverable lines: 13
Total lines: 46
Line coverage: 61.5%
Branch coverage
50%
Covered branches: 2
Total branches: 4
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor(...)100%11100%
GetProperty()50%4466.66%
OnAbort()100%110%
OnCloseAsync(...)100%110%
OnOpenAsync(...)100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.NetFramingBase/src/CoreWCF/Channels/ReplyChannel.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3
 4using System.Threading;
 5using System.Threading.Tasks;
 6
 7namespace CoreWCF.Channels
 8{
 9    internal class ReplyChannel : ServiceChannelBase, IReplyChannel
 10    {
 2811        public ReplyChannel(IDefaultCommunicationTimeouts timeouts, EndpointAddress localAddress) : base(timeouts)
 12        {
 2813            LocalAddress = localAddress;
 2814        }
 15
 016        public EndpointAddress LocalAddress { get; }
 17
 18        public override T GetProperty<T>()
 19        {
 2820            if (typeof(T) == typeof(IReplyChannel))
 21            {
 022                return (T)(object)this;
 23            }
 24
 2825            T baseProperty = base.GetProperty<T>();
 2826            if (baseProperty != null)
 27            {
 028                return baseProperty;
 29            }
 30
 2831            return default;
 32        }
 33
 034        protected override void OnAbort() { }
 35
 36        protected override Task OnCloseAsync(CancellationToken token)
 37        {
 038            return Task.CompletedTask;
 39        }
 40
 41        protected override Task OnOpenAsync(CancellationToken token)
 42        {
 2843            return Task.CompletedTask;
 44        }
 45    }
 46}