< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Dispatcher.ChannelDispatcherBase
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Dispatcher/ChannelDispatcherBase.cs
Line coverage
25%
Covered lines: 2
Uncovered lines: 6
Coverable lines: 8
Total lines: 43
Line coverage: 25%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
AttachInternal(...)100%11100%
Attach(...)100%110%
DetachInternal(...)100%110%
Detach(...)100%110%
CloseInputAsync()100%110%
CloseInputAsync(...)100%110%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Dispatcher/ChannelDispatcherBase.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;
 6using CoreWCF.Channels;
 7
 8namespace CoreWCF.Dispatcher
 9{
 10    // TODO: Fold ChannelDispatcherBase implementation into ChannelDispatcher. I believe this was only here for legacy r
 11    public abstract class ChannelDispatcherBase : CommunicationObject
 12    {
 13        public abstract ServiceHostBase Host { get; }
 14
 15        internal void AttachInternal(ServiceHostBase host)
 16        {
 64017            Attach(host);
 64018        }
 19
 20        protected virtual void Attach(ServiceHostBase host)
 21        {
 022        }
 23
 24        internal void DetachInternal(ServiceHostBase host)
 25        {
 026            Detach(host);
 027        }
 28
 29        protected virtual void Detach(ServiceHostBase host)
 30        {
 031        }
 32
 33        public virtual Task CloseInputAsync()
 34        {
 035            return Task.CompletedTask;
 36        }
 37
 38        internal virtual Task CloseInputAsync(CancellationToken token)
 39        {
 040            return CloseInputAsync(); // back-compat
 41        }
 42    }
 43}