< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Channels.UnixDomainSocketOptions
Assembly: CoreWCF.UnixDomainSocket
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.UnixDomainSocket/src/CoreWCF/Channels/UnixDomainSocketOptions.cs
Line coverage
85%
Covered lines: 12
Uncovered lines: 2
Coverable lines: 14
Total lines: 35
Line coverage: 85.7%
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
Listen(...)100%110%
Listen(...)100%11100%
Listen(...)100%110%
Listen(...)50%44100%
ApplyEndpointDefaults(...)100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.UnixDomainSocket/src/CoreWCF/Channels/UnixDomainSocketOptions.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.Collections.Generic;
 6
 7namespace CoreWCF.Channels
 8{
 9    public class UnixDomainSocketOptions
 10    {
 911        internal List<UnixDomainSocketListenOptions> CodeBackedListenOptions { get; } = new List<UnixDomainSocketListenO
 312        public IServiceProvider ApplicationServices { get; internal set; }
 13
 014        public void Listen(string baseAddress) => Listen(new Uri(baseAddress));
 615        public void Listen(Uri baseAddress) => Listen(baseAddress, _ => { });
 16
 017        public void Listen(string baseAddress, Action<UnixDomainSocketListenOptions> configure) => Listen(new Uri(baseAd
 18        public void Listen(Uri baseAddress, Action<UnixDomainSocketListenOptions> configure)
 19        {
 320            if (baseAddress == null) throw new ArgumentNullException(nameof(baseAddress));
 321            if (configure == null) throw new ArgumentNullException(nameof(configure));
 22
 323            var listenOptions = new UnixDomainSocketListenOptions(baseAddress);
 324            ApplyEndpointDefaults(listenOptions);
 325            configure(listenOptions);
 326            CodeBackedListenOptions.Add(listenOptions);
 327        }
 28
 29        private void ApplyEndpointDefaults(UnixDomainSocketListenOptions listenOptions)
 30        {
 331            listenOptions.UnixDomainSocketServerOptions = this;
 332        }
 33    }
 34}
 35