< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Queue.Common.QueueInputChannel
Assembly: CoreWCF.Queue
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Queue/src/CoreWCF/Queue/Common/QueueInputChannel.cs
Line coverage
53%
Covered lines: 8
Uncovered lines: 7
Coverable lines: 15
Total lines: 65
Line coverage: 53.3%
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
.ctor(...)100%11100%
GetProperty()100%11100%
ReceiveAsync(...)100%110%
TryReceiveAsync(...)100%110%
OnAbort()100%110%
OnCloseAsync(...)100%110%
OnOpenAsync(...)100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Queue/src/CoreWCF/Queue/Common/QueueInputChannel.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;
 5using CoreWCF.Channels;
 6using CoreWCF.Configuration;
 7using System.Threading;
 8using System.Threading.Tasks;
 9using Microsoft.Extensions.DependencyInjection;
 10
 11namespace CoreWCF.Queue.Common
 12{
 13    internal class QueueInputChannel : CommunicationObject, IInputChannel
 14    {
 15        private readonly IServiceProvider _serviceProvider;
 16
 171817        public QueueInputChannel(IServiceProvider provider)
 18        {
 171819            IServiceScope serviceScope = provider.CreateScope();
 171820            _serviceProvider = serviceScope.ServiceProvider;
 171821        }
 22
 23        public IServiceChannelDispatcher ChannelDispatcher
 24        {
 025            get => throw new NotImplementedException();
 026            set => throw new NotImplementedException();
 27        }
 28
 171829        public EndpointAddress LocalAddress { get; set; }
 30
 31        protected override TimeSpan DefaultCloseTimeout
 32        {
 033            get { return TimeSpan.MaxValue; }
 34        }
 35
 36        protected override TimeSpan DefaultOpenTimeout
 37        {
 171838            get { return TimeSpan.MaxValue; }
 39        }
 40
 41        public virtual T GetProperty<T>() where T : class
 42        {
 522243            return _serviceProvider.GetService<T>();
 44        }
 45
 046        public Task<Message> ReceiveAsync(CancellationToken token) => throw new NotImplementedException();
 47
 48        public Task<(Message message, bool success)> TryReceiveAsync(CancellationToken token) =>
 049            throw new NotImplementedException();
 50
 51        protected override void OnAbort()
 52        {
 053        }
 54
 55        protected override Task OnCloseAsync(CancellationToken token)
 56        {
 057            return Task.CompletedTask;
 58        }
 59
 60        protected override Task OnOpenAsync(CancellationToken token)
 61        {
 171862            return Task.CompletedTask;
 63        }
 64    }
 65}