From 27ffd8c8f9e94b814aface0a4c8b06305ca3d97d Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 20 Nov 2020 01:19:20 +0100 Subject: [PATCH 1/3] Enable nullable: System.Management.Automation.Remoting.Client.IWSManNativeApiFacade --- .../engine/remoting/fanin/WSManNativeAPI.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs index 404dd3b576d..3dd6dba8c1d 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs @@ -3014,6 +3014,8 @@ internal static extern void WSManPluginRegisterShutdownCallback( #endregion } +#nullable enable + /// /// Interface to enable stubbing of the WSManNativeApi PInvoke calls for /// unit testing. @@ -3037,7 +3039,7 @@ int WSManPluginOperationComplete( int WSManPluginReceiveResult( IntPtr requestDetails, int flags, - string stream, + string? stream, IntPtr streamResult, string commandState, int exitCode); @@ -3053,6 +3055,8 @@ void WSManPluginRegisterShutdownCallback( IntPtr shutdownContext); } +#nullable restore + /// /// Concrete implementation of the PInvoke facade for use in the production code. /// From 65f3eb88721bd5d4bbeb84411ac41cef746ef299 Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 20 Nov 2020 19:03:59 +0100 Subject: [PATCH 2/3] Removing whitespace before/after nullable pragma --- .../engine/remoting/fanin/WSManNativeAPI.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs index 3dd6dba8c1d..3de807cc9d0 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs @@ -3015,7 +3015,6 @@ internal static extern void WSManPluginRegisterShutdownCallback( } #nullable enable - /// /// Interface to enable stubbing of the WSManNativeApi PInvoke calls for /// unit testing. @@ -3054,7 +3053,6 @@ void WSManPluginRegisterShutdownCallback( IntPtr shutdownCallback, IntPtr shutdownContext); } - #nullable restore /// From de229a7d9e8d21701759d1ee93594776b947464a Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 20 Nov 2020 19:44:20 +0100 Subject: [PATCH 3/3] Removing whitespace before/after nullable pragma --- .../engine/remoting/fanin/WSManNativeAPI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs index 3de807cc9d0..830c08e36d0 100644 --- a/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs +++ b/src/System.Management.Automation/engine/remoting/fanin/WSManNativeAPI.cs @@ -3014,12 +3014,12 @@ internal static extern void WSManPluginRegisterShutdownCallback( #endregion } -#nullable enable /// /// Interface to enable stubbing of the WSManNativeApi PInvoke calls for /// unit testing. /// Note: It is implemented as a class to avoid exposing it outside the module. /// +#nullable enable internal interface IWSManNativeApiFacade { // TODO: Expand this to cover the rest of the API once I prove that it works!