< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 12
Coverable lines: 12
Total lines: 52
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/Signatures/MethodSignature.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
 4using System.Collections.Immutable;
 5using System.Reflection.Metadata;
 6
 7namespace System.Reflection.Metadata
 8{
 9    /// <summary>
 10    /// Represents a method (definition, reference, or standalone) or property signature.
 11    /// In the case of properties, the signature matches that of a getter with a distinguishing <see cref="SignatureHead
 12    /// </summary>
 13    public readonly struct MethodSignature<TType>
 14    {
 15        /// <summary>
 16        /// Represents the information in the leading byte of the signature (kind, calling convention, flags).
 17        /// </summary>
 018        public SignatureHeader Header { get; }
 19
 20        /// <summary>
 21        /// Gets the method's return type.
 22        /// </summary>
 023        public TType ReturnType { get; }
 24
 25        /// <summary>
 26        /// Gets the number of parameters that are required. Will be equal to the length <see cref="ParameterTypes"/> of
 27        /// unless this signature represents the standalone call site of a vararg method, in which case the entries
 28        /// extra entries in <see cref="ParameterTypes"/> are the types used for the optional parameters.
 29        /// </summary>
 030        public int RequiredParameterCount { get; }
 31
 32        /// <summary>
 33        /// Gets the number of generic type parameters of the method. Will be 0 for non-generic methods.
 34        /// </summary>
 035        public int GenericParameterCount { get; }
 36
 37        /// <summary>
 38        /// Gets the method's parameter types.
 39        /// </summary>
 040        public ImmutableArray<TType> ParameterTypes { get; }
 41
 42        public MethodSignature(SignatureHeader header, TType returnType, int requiredParameterCount, int genericParamete
 043        {
 044            Header = header;
 045            ReturnType = returnType;
 046            GenericParameterCount = genericParameterCount;
 047            RequiredParameterCount = requiredParameterCount;
 048            ParameterTypes = parameterTypes;
 049        }
 50    }
 51}
 52