< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 32
Line coverage: 0%
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%110%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/TypeNameParseOptions.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 System.Reflection.Metadata
 5{
 6    public sealed class TypeNameParseOptions
 7    {
 08        private int _maxNodes = 20;
 9
 10        /// <summary>
 11        /// Limits the maximum value of <seealso cref="TypeName.GetNodeCount">node count</seealso> that parser can handl
 12        /// </summary>
 13        /// <remarks>
 14        /// <para>
 15        /// Setting this to a large value can render <see cref="TypeName"/> susceptible to Denial of Service
 16        /// attacks when parsing or handling malicious input.
 17        /// </para>
 18        /// <para>The default value is 20.</para>
 19        /// </remarks>
 20        public int MaxNodes
 21        {
 022            get => _maxNodes;
 23            set
 024            {
 025                ArgumentOutOfRangeException.ThrowIfLessThanOrEqual(value, 0, nameof(value));
 26
 027                _maxNodes = value;
 028            }
 29        }
 30    }
 31}
 32