From 5b89ea650482612d8a43d7c7f496aec8621398a0 Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 20 Nov 2020 01:03:13 +0100 Subject: [PATCH 1/3] Enable nullable: System.Management.Automation.IArgumentCompleter --- .../engine/CommandCompletion/ExtensibleCompletion.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs b/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs index 6905e39b165..f04474113cf 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs @@ -55,6 +55,8 @@ public ArgumentCompleterAttribute(ScriptBlock scriptBlock) } } +#nullable enable + /// /// A type specified by the must implement this interface. /// @@ -83,6 +85,8 @@ IEnumerable CompleteArgument( IDictionary fakeBoundParameters); } +#nullable restore + /// /// [Cmdlet(VerbsLifecycle.Register, "ArgumentCompleter", HelpUri = "https://go.microsoft.com/fwlink/?LinkId=528576")] From cabedad2a58ae56ef2a2dd2cff95bab6cbb53981 Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 20 Nov 2020 18:52:16 +0100 Subject: [PATCH 2/3] Removing whitespace before/after nullable pragma --- .../engine/CommandCompletion/ExtensibleCompletion.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs b/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs index f04474113cf..ddf01b96318 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs @@ -56,7 +56,6 @@ public ArgumentCompleterAttribute(ScriptBlock scriptBlock) } #nullable enable - /// /// A type specified by the must implement this interface. /// @@ -84,7 +83,6 @@ IEnumerable CompleteArgument( CommandAst commandAst, IDictionary fakeBoundParameters); } - #nullable restore /// From c38548601389f60bd9ce7a79c7e205c253305f9d Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 20 Nov 2020 19:23:28 +0100 Subject: [PATCH 3/3] Removing whitespace before/after nullable pragma --- .../engine/CommandCompletion/ExtensibleCompletion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs b/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs index ddf01b96318..53fe6f7b5e2 100644 --- a/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs +++ b/src/System.Management.Automation/engine/CommandCompletion/ExtensibleCompletion.cs @@ -55,10 +55,10 @@ public ArgumentCompleterAttribute(ScriptBlock scriptBlock) } } -#nullable enable /// /// A type specified by the must implement this interface. /// +#nullable enable public interface IArgumentCompleter { ///