< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Configuration.WrappingIServer
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Configuration/WrappingIServer.cs
Line coverage
93%
Covered lines: 15
Uncovered lines: 1
Coverable lines: 16
Total lines: 54
Line coverage: 93.7%
Branch coverage
50%
Covered branches: 1
Total branches: 2
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%
Dispose()100%11100%
StartAsync()50%2287.5%
StopAsync(...)100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Configuration/WrappingIServer.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.Runtime.ExceptionServices;
 5using System.Threading;
 6using System.Threading.Tasks;
 7using CoreWCF.Runtime;
 8using Microsoft.AspNetCore.Hosting.Server;
 9using Microsoft.AspNetCore.Http.Features;
 10
 11namespace CoreWCF.Configuration
 12{
 13    internal class WrappingIServer : IServer
 14    {
 15        private readonly ServiceBuilder _serviceBuilder;
 16
 51317        public WrappingIServer(ServiceBuilder serviceBuilder)
 18        {
 51319            _serviceBuilder = serviceBuilder;
 51320        }
 21
 200222        public IFeatureCollection Features => InnerServer.Features;
 23
 450124        public IServer InnerServer { get; internal set; }
 25
 26        public void Dispose()
 27        {
 102228            InnerServer.Dispose();
 102229        }
 30
 31        public async Task StartAsync<TContext>(IHttpApplication<TContext> application, CancellationToken cancellationTok
 32        {
 51233            await InnerServer.StartAsync(application, cancellationToken).ConfigureAwait(false);
 34            try
 35            {
 51236                await _serviceBuilder.OpenAsync(cancellationToken);
 50237            }
 1038            catch (CallbackException e)
 39            {
 1040                if (e.InnerException != null)
 41                {
 1042                    ExceptionDispatchInfo.Capture(e.InnerException).Throw();
 43                }
 44
 045                throw;
 46            }
 50247        }
 48
 49        public Task StopAsync(CancellationToken cancellationToken)
 50        {
 45251            return InnerServer.StopAsync(cancellationToken);
 52        }
 53    }
 54}