< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 19
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
UnexpectedValue(...)0%440%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/Utilities/ExceptionUtilities.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.Internal
 5{
 6    internal static class ExceptionUtilities
 7    {
 8        internal static Exception UnexpectedValue(object value)
 09        {
 010            if (value?.GetType().FullName != null)
 011            {
 012                return new InvalidOperationException(SR.Format(SR.UnexpectedValue, value, value.GetType().FullName));
 13            }
 14
 015            return new InvalidOperationException(SR.Format(SR.UnexpectedValueUnknownType, value));
 016        }
 17    }
 18}
 19

Methods/Properties

UnexpectedValue(System.Object)