<PackageReference Include="Polly.Core" Version="8.0.0-alpha.6" />

MemberNotNullWhenAttribute

Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
public string[] Members { get; }

Gets field or property member names.

public bool ReturnValue { get; }

Gets the return value condition.

public MemberNotNullWhenAttribute(bool returnValue, string member)

Initializes the attribute with the specified return value condition and a field or property member.

public MemberNotNullWhenAttribute(bool returnValue, string[] members)

Initializes the attribute with the specified return value condition and list of field and property members.