PKHeX/PKHeX.Core/Util/NetFramework/CodeAnalysis.cs

17 lines
617 B
C#
Raw Normal View History

#if !NET6_0_OR_GREATER
namespace System.Diagnostics.CodeAnalysis;
[AttributeUsage(AttributeTargets.Parameter)]
internal sealed class NotNullWhenAttribute : 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 will not be null.
/// </param>
public NotNullWhenAttribute(bool returnValue) => ReturnValue = returnValue;
/// <summary>Gets the return value condition.</summary>
public bool ReturnValue { get; }
}
#endif