From d71d0df377c803a5db318bd3e18ae5bf3d2d1e35 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Mon, 9 Nov 2020 18:01:59 +0000 Subject: [PATCH 1/2] Enable nullable: System.Management.Automation.Internal.IValidateSetValuesGenerator --- src/System.Management.Automation/engine/Attributes.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/System.Management.Automation/engine/Attributes.cs b/src/System.Management.Automation/engine/Attributes.cs index cbe4a2b0dd7..74369d64218 100644 --- a/src/System.Management.Automation/engine/Attributes.cs +++ b/src/System.Management.Automation/engine/Attributes.cs @@ -1731,6 +1731,7 @@ public ValidateSetAttribute(Type valuesGeneratorType) /// /// Allows dynamically generate set of values for /// +#nullable enable public interface IValidateSetValuesGenerator { /// @@ -1738,6 +1739,7 @@ public interface IValidateSetValuesGenerator /// string[] GetValidValues(); } +#nullable restore /// /// Validates that each parameter argument is Trusted data. From 4c2706cb122ee91a184be5c0d21d9e13c9ee9786 Mon Sep 17 00:00:00 2001 From: xtqqczze Date: Wed, 11 Nov 2020 01:58:48 +0000 Subject: [PATCH 2/2] Add documentation comment for return type Address @iSazonov review --- src/System.Management.Automation/engine/Attributes.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/System.Management.Automation/engine/Attributes.cs b/src/System.Management.Automation/engine/Attributes.cs index 74369d64218..347eb4c7cd5 100644 --- a/src/System.Management.Automation/engine/Attributes.cs +++ b/src/System.Management.Automation/engine/Attributes.cs @@ -1737,6 +1737,7 @@ public interface IValidateSetValuesGenerator /// /// Gets valid values. /// + /// A non-null array of non-null strings. string[] GetValidValues(); } #nullable restore