< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.Security.LaxTimestampFirstModeSecurityHeaderElementInferenceEngine
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/LaxTimestampFirstModeSecurityHeaderElementInferenceEngine.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 24
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
.ctor()100%110%
MarkElements(...)0%440%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/Security/LaxTimestampFirstModeSecurityHeaderElementInferenceEngine.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
 4namespace CoreWCF.Security
 5{
 6    internal sealed class LaxTimestampFirstModeSecurityHeaderElementInferenceEngine : LaxModeSecurityHeaderElementInfere
 7    {
 08        private LaxTimestampFirstModeSecurityHeaderElementInferenceEngine() { }
 9
 010        internal static new LaxTimestampFirstModeSecurityHeaderElementInferenceEngine Instance { get; } = new LaxTimesta
 11
 12        public override void MarkElements(ReceiveSecurityHeaderElementManager elementManager, bool messageSecurityMode)
 13        {
 014            for (int position = 1; position < elementManager.Count; position++)
 15            {
 016                if (elementManager.GetElementCategory(position) == ReceiveSecurityHeaderElementCategory.Timestamp)
 17                {
 018                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new MessageSecurityException(SR.Format(SR.
 19                }
 20            }
 021            base.MarkElements(elementManager, messageSecurityMode);
 022        }
 23    }
 24}