< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 12
Coverable lines: 12
Total lines: 41
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
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%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Net.Security/src/System/Net/Security/CipherSuitesPolicy.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.Collections.Generic;
 5using System.Runtime.Versioning;
 6
 7namespace System.Net.Security
 8{
 9    /// <summary>
 10    /// Specifies allowed cipher suites.
 11    /// </summary>
 12    [UnsupportedOSPlatform("windows")]
 13    [UnsupportedOSPlatform("android")]
 14    public sealed partial class CipherSuitesPolicy
 15    {
 016        internal CipherSuitesPolicyPal Pal { get; }
 17
 18        [CLSCompliant(false)]
 019        public CipherSuitesPolicy(IEnumerable<TlsCipherSuite> allowedCipherSuites)
 020        {
 021            ArgumentNullException.ThrowIfNull(allowedCipherSuites);
 22
 023            Pal = new CipherSuitesPolicyPal(allowedCipherSuites);
 024        }
 25
 26        [CLSCompliant(false)]
 27        public IEnumerable<TlsCipherSuite> AllowedCipherSuites
 28        {
 29            get
 030            {
 31                // This method is only useful only for diagnostic purposes so perf is not important
 32                // We do not want users to be able to cast result to something they can modify
 033                foreach (TlsCipherSuite cs in Pal.GetCipherSuites())
 034                {
 035                    yield return cs;
 036                }
 037            }
 38        }
 39    }
 40}
 41