< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Security.TrustVersion
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/TrustVersion.cs
Line coverage
88%
Covered lines: 15
Uncovered lines: 2
Coverable lines: 17
Total lines: 50
Line coverage: 88.2%
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%
.cctor()100%11100%
.ctor()100%11100%
.cctor()100%11100%
.ctor()100%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/TrustVersion.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.Xml;
 5
 6namespace CoreWCF.Security
 7{
 8    public abstract class TrustVersion
 9    {
 710        internal TrustVersion(XmlDictionaryString ns, XmlDictionaryString prefix)
 11        {
 712            Namespace = ns;
 713            Prefix = prefix;
 714        }
 15
 016        public XmlDictionaryString Namespace { get; }
 17
 018        public XmlDictionaryString Prefix { get; }
 19
 420        public static TrustVersion Default => WSTrustFeb2005;
 21
 19522        public static TrustVersion WSTrustFeb2005 => WSTrustVersionFeb2005.Instance;
 23
 22924        public static TrustVersion WSTrust13 => WSTrustVersion13.Instance;
 25
 26        private class WSTrustVersionFeb2005 : TrustVersion
 27        {
 428            private static readonly WSTrustVersionFeb2005 s_instance = new WSTrustVersionFeb2005();
 29
 30            protected WSTrustVersionFeb2005()
 431                : base(XD.TrustFeb2005Dictionary.Namespace, XD.TrustFeb2005Dictionary.Prefix)
 32            {
 433            }
 34
 19535            public static TrustVersion Instance => s_instance;
 36        }
 37
 38        private class WSTrustVersion13 : TrustVersion
 39        {
 340            private static readonly WSTrustVersion13 s_instance = new WSTrustVersion13();
 41
 42            protected WSTrustVersion13()
 343                : base(DXD.TrustDec2005Dictionary.Namespace, DXD.TrustDec2005Dictionary.Prefix)
 44            {
 345            }
 46
 22947            public static TrustVersion Instance => s_instance;
 48        }
 49    }
 50}