< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Queue.Common.QueueProcessMessage
Assembly: CoreWCF.Queue
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Queue/src/CoreWCF/Queue/Common/QueueProcessMessage.cs
Line coverage
100%
Covered lines: 12
Uncovered lines: 0
Coverable lines: 12
Total lines: 33
Line coverage: 100%
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%
InvokeAsync()100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Queue/src/CoreWCF/Queue/Common/QueueProcessMessage.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 System.Threading.Tasks;
 6using CoreWCF.Queue.Common.Configuration;
 7using Microsoft.Extensions.DependencyInjection;
 8
 9namespace CoreWCF.Queue.Common
 10{
 11    internal class QueueProcessMessage
 12    {
 13        private readonly QueueMessageDispatcherDelegate _next;
 14        private readonly IServiceProvider _serviceProvider;
 15
 5016        public QueueProcessMessage(QueueMessageDispatcherDelegate next, IServiceProvider serviceProvider)
 17        {
 5018            _next = next;
 5019            _serviceProvider = serviceProvider;
 5020        }
 21
 22        public async Task InvokeAsync(QueueMessageContext queueMessageContext)
 23        {
 171824            QueueInputChannel inputChannel = _serviceProvider.GetRequiredService<QueueInputChannel>();
 171825            inputChannel.LocalAddress =
 171826                new EndpointAddress(queueMessageContext.QueueTransportContext.ServiceDispatcher.BaseAddress);
 171827            var channelDispatcher =
 171828                await queueMessageContext.QueueTransportContext.ServiceDispatcher.CreateServiceChannelDispatcherAsync(
 171829                    inputChannel);
 171830            await channelDispatcher.DispatchAsync(queueMessageContext);
 171831        }
 32    }
 33}