< Summary - CoreWCF Coverage — PR #1766

Information
Class: CoreWCF.IdentityModel.Configuration.IdentityModelCaches
Assembly: CoreWCF.Primitives
File(s): /home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/IdentityModel/Configuration/IdentityModelCaches.cs
Line coverage
25%
Covered lines: 3
Uncovered lines: 9
Coverable lines: 12
Total lines: 60
Line coverage: 25%
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%11100%

File(s)

/home/runner/work/CoreWCF/CoreWCF/src/CoreWCF.Primitives/src/CoreWCF/IdentityModel/Configuration/IdentityModelCaches.cs

#LineLine coverage
 1
 2// Licensed to the .NET Foundation under one or more agreements.
 3// The .NET Foundation licenses this file to you under the MIT license.
 4
 5using CoreWCF.IdentityModel.Tokens;
 6
 7namespace CoreWCF.IdentityModel.Configuration
 8{
 9    /// <summary>
 10    /// Defines caches supported by IdentityModel for TokenReplay and SecuritySessionTokens
 11    /// </summary>
 12    public sealed class IdentityModelCaches
 13    {
 1014        private TokenReplayCache _tokenReplayCache = new DefaultTokenReplayCache();
 1015        private SessionSecurityTokenCache _sessionSecurityTokenCache = new MruSessionSecurityTokenCache();
 16
 17        /// <summary>
 18        /// Gets or sets the TokenReplayCache that is used to determine replayed token.
 19        /// </summary>
 20        public TokenReplayCache TokenReplayCache
 21        {
 22            get
 23            {
 024                return _tokenReplayCache;
 25            }
 26
 27            set
 28            {
 029                if (value == null)
 30                {
 031                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(value));
 32                }
 33
 034                _tokenReplayCache = value;
 035            }
 36        }
 37
 38        /// <summary>
 39        /// Gets or sets the SessionSecurityTokenCache that is used to cache the <see cref="SessionSecurityToken"/>
 40        /// </summary>
 41        public SessionSecurityTokenCache SessionSecurityTokenCache
 42        {
 43            get
 44            {
 245                return _sessionSecurityTokenCache;
 46            }
 47
 48            set
 49            {
 050                if (value == null)
 51                {
 052                    throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(value));
 53                }
 54
 055                _sessionSecurityTokenCache = value;
 056            }
 57        }
 58
 59    }
 60}