< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 13
Coverable lines: 13
Total lines: 28
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%
.ctor(...)0%440%
ToString()100%110%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Net.Primitives/src/System/Net/Cache/RequestCachePolicy.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.Net.Cache
 5{
 6    public class RequestCachePolicy
 7    {
 08        public RequestCachePolicy()
 09        {
 010            Level = RequestCacheLevel.Default;
 011        }
 12
 013        public RequestCachePolicy(RequestCacheLevel level)
 014        {
 015            if (level < RequestCacheLevel.Default || level > RequestCacheLevel.NoCacheNoStore)
 016            {
 017                throw new ArgumentOutOfRangeException(nameof(level));
 18            }
 19
 020            Level = level;
 021        }
 22
 023        public RequestCacheLevel Level { get; }
 24
 025        public override string ToString() => "Level:" + Level.ToString();
 26    }
 27}
 28