< Summary - Results for net481, Release

Information
Class: System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute
Assembly: LockCheck
File(s): D:\a\LockCheck\LockCheck\src\LockCheck\CodeAnalysisShim.cs
Tag: 117_11660770947
Line coverage
0%
Covered lines: 0
Uncovered lines: 2
Coverable lines: 2
Total lines: 35
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 Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
get_ParameterName()100%210%

File(s)

D:\a\LockCheck\LockCheck\src\LockCheck\CodeAnalysisShim.cs

#LineLine coverage
 1#if NETFRAMEWORK
 2
 3// Some attribute definitions that are not available on .NET Framework.
 4// Add additional ones as required.
 5
 6namespace System.Diagnostics.CodeAnalysis;
 7
 8 /// <summary>Specifies that when a method returns <see cref="ReturnValue"/>, the parameter will not be null even if the
 9[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
 10internal sealed class NotNullWhenAttribute : Attribute
 11{
 12    /// <summary>Initializes the attribute with the specified return value condition.</summary>
 13    /// <param name="returnValue">
 14    /// The return value condition. If the method returns this value, the associated parameter will not be null.
 15    /// </param>
 16    public NotNullWhenAttribute(bool returnValue) => ReturnValue = returnValue;
 17
 18    /// <summary>Gets the return value condition.</summary>
 19    public bool ReturnValue { get; }
 20}
 21
 22/// <summary>Specifies that the output will be non-null if the named parameter is non-null.</summary>
 23[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue, AllowMultiple = t
 24internal sealed class NotNullIfNotNullAttribute : Attribute
 25{
 26    /// <summary>Initializes the attribute with the associated parameter name.</summary>
 27    /// <param name="parameterName">
 28    /// The associated parameter name.  The output will be non-null if the argument to the parameter specified is non-nu
 29    /// </param>
 030    public NotNullIfNotNullAttribute(string parameterName) => ParameterName = parameterName;
 31
 32    /// <summary>Gets the associated parameter name.</summary>
 033    public string ParameterName { get; }
 34}
 35#endif

Methods/Properties

.ctor(string)
get_ParameterName()