< Summary

Information
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 37
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
IsValid(...)100%110%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/MetadataStreamOptions.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    [Flags]
 7    public enum MetadataStreamOptions
 8    {
 9        /// <summary>
 10        /// By default the stream is disposed when <see cref="MetadataReaderProvider"/> is disposed and sections of the 
 11        /// </summary>
 12        Default = 0,
 13
 14        /// <summary>
 15        /// Keep the stream open when the <see cref="MetadataReaderProvider"/> is disposed.
 16        /// </summary>
 17        LeaveOpen = 1,
 18
 19        /// <summary>
 20        /// Reads PDB metadata into memory right away.
 21        /// </summary>
 22        /// <remarks>
 23        /// The underlying file may be closed and even deleted after <see cref="MetadataReaderProvider"/> is constructed
 24        /// <see cref="MetadataReaderProvider"/> closes the stream automatically by the time the constructor returns unl
 25        /// </remarks>
 26        PrefetchMetadata = 1 << 1,
 27    }
 28
 29    internal static class MetadataStreamOptionsExtensions
 30    {
 31        public static bool IsValid(this MetadataStreamOptions options)
 032        {
 033            return (options & ~(MetadataStreamOptions.LeaveOpen | MetadataStreamOptions.PrefetchMetadata)) == 0;
 034        }
 35    }
 36}
 37