mirror of https://github.com/icsharpcode/ILSpy.git
9 changed files with 77 additions and 8 deletions
@ -0,0 +1,25 @@ |
|||||||
|
// 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 |
||||||
|
{ |
||||||
|
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)] |
||||||
|
internal sealed class MemberNotNullWhenAttribute : Attribute |
||||||
|
{ |
||||||
|
public bool ReturnValue { get; } |
||||||
|
|
||||||
|
public string[] Members { get; } |
||||||
|
|
||||||
|
public MemberNotNullWhenAttribute(bool returnValue, string member) |
||||||
|
{ |
||||||
|
ReturnValue = returnValue; |
||||||
|
Members = new string[1] { member }; |
||||||
|
} |
||||||
|
|
||||||
|
public MemberNotNullWhenAttribute(bool returnValue, params string[] members) |
||||||
|
{ |
||||||
|
ReturnValue = returnValue; |
||||||
|
Members = members; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue