< Summary

Information
Class: System.Reflection.Internal.ExceptionUtilities
Assembly: System.Reflection.Metadata
File(s): D:\runner\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Internal\Utilities\ExceptionUtilities.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 18
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)

D:\runner\runtime\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}

Methods/Properties

UnexpectedValue(System.Object)