28 lines
1.2 KiB
C#
28 lines
1.2 KiB
C#
// <auto-generated/>
|
|
#pragma warning disable
|
|
#nullable enable annotations
|
|
|
|
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
|
|
namespace System.Diagnostics.CodeAnalysis
|
|
{
|
|
/// <summary>
|
|
/// Specifies that when a method returns <see cref="ReturnValue"/>, the parameter may be null even if the corresponding type disallows it.
|
|
/// </summary>
|
|
[global::System.AttributeUsage(global::System.AttributeTargets.Parameter, Inherited = false)]
|
|
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
|
|
public sealed class MaybeNullWhenAttribute : global::System.Attribute
|
|
{
|
|
/// <summary>
|
|
/// Initializes the attribute with the specified return value condition.
|
|
/// </summary>
|
|
/// <param name="returnValue">The return value condition. If the method returns this value, the associated parameter may be null.</param>
|
|
public MaybeNullWhenAttribute(bool returnValue) => ReturnValue = returnValue;
|
|
|
|
/// <summary>
|
|
/// Gets the return value condition.
|
|
/// </summary>
|
|
public bool ReturnValue { get; }
|
|
}
|
|
} |