// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #if !NETSTANDARD2_1_OR_GREATER namespace System.Diagnostics.CodeAnalysis; /// /// Specifies that when a method returns , the parameter /// will not be null even if the corresponding type allows it. /// /// Internal copy of the .NET Standard 2.1 attribute. [AttributeUsage(AttributeTargets.Parameter)] internal sealed class NotNullWhenAttribute : Attribute { /// /// Initializes a new instance of the class. /// /// /// The return value condition. If the method returns this value, /// the associated parameter will not be . /// public NotNullWhenAttribute(bool returnValue) { ReturnValue = returnValue; } /// /// Gets a value indicating whether the return value should be . /// public bool ReturnValue { get; } } #endif