< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Channels.AuthenticationSchemesBindingParameter
Assembly: CoreWCF.Http
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Http/src/CoreWCF/Channels/AuthenticationSchemesBindingParameter.cs
Line coverage
40%
Covered lines: 4
Uncovered lines: 6
Coverable lines: 10
Total lines: 34
Line coverage: 40%
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%110%
TryExtract(...)50%2266.66%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Http/src/CoreWCF/Channels/AuthenticationSchemesBindingParameter.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.Net;
 5using CoreWCF.Runtime;
 6
 7namespace CoreWCF.Channels
 8{
 9    internal class AuthenticationSchemesBindingParameter
 10    {
 011        public AuthenticationSchemesBindingParameter(AuthenticationSchemes authenticationSchemes)
 12        {
 13            Fx.Assert(authenticationSchemes != AuthenticationSchemes.None, "AuthenticationSchemesBindingParameter should
 14
 015            AuthenticationSchemes = authenticationSchemes;
 016        }
 17
 018        public AuthenticationSchemes AuthenticationSchemes { get; } = AuthenticationSchemes.None;
 19
 20        public static bool TryExtract(BindingParameterCollection collection, out AuthenticationSchemes authenticationSch
 21        {
 22            Fx.Assert(collection != null, "collection != null");
 3123            authenticationSchemes = AuthenticationSchemes.None;
 3124            AuthenticationSchemesBindingParameter instance = collection.Find<AuthenticationSchemesBindingParameter>();
 3125            if (instance != null)
 26            {
 027                authenticationSchemes = instance.AuthenticationSchemes;
 028                return true;
 29            }
 30
 3131            return false;
 32        }
 33    }
 34}