From 2dc777ef20f78dac9b01cadffb0e8e7ba2ab7170 Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 20 Nov 2020 00:15:22 +0100 Subject: [PATCH 1/3] Enable nullable: System.Management.Automation.Host.IHostSupportsInteractiveSession --- src/System.Management.Automation/engine/hostifaces/MshHost.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/hostifaces/MshHost.cs b/src/System.Management.Automation/engine/hostifaces/MshHost.cs index 64d8f1170f2..48b31323f89 100644 --- a/src/System.Management.Automation/engine/hostifaces/MshHost.cs +++ b/src/System.Management.Automation/engine/hostifaces/MshHost.cs @@ -286,6 +286,8 @@ public virtual bool DebuggerEnabled } } +#nullable enable + /// /// This interface needs to be implemented by PSHost objects that want to support the PushRunspace /// and PopRunspace functionality. @@ -317,6 +319,6 @@ public interface IHostSupportsInteractiveSession /// Returns the current runspace associated with this host. /// [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Runspace")] - Runspace Runspace { get; } + Runspace? Runspace { get; } } } From c5a32a8427fbfe0fed32b4956aa0f80614157365 Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 20 Nov 2020 18:55:39 +0100 Subject: [PATCH 2/3] Removing whitespace before/after nullable pragma --- src/System.Management.Automation/engine/hostifaces/MshHost.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/System.Management.Automation/engine/hostifaces/MshHost.cs b/src/System.Management.Automation/engine/hostifaces/MshHost.cs index 48b31323f89..476d00b940d 100644 --- a/src/System.Management.Automation/engine/hostifaces/MshHost.cs +++ b/src/System.Management.Automation/engine/hostifaces/MshHost.cs @@ -287,7 +287,6 @@ public virtual bool DebuggerEnabled } #nullable enable - /// /// This interface needs to be implemented by PSHost objects that want to support the PushRunspace /// and PopRunspace functionality. From 3f5af85fb0389005adf3d2aa951ed3e9932cf215 Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 20 Nov 2020 19:39:27 +0100 Subject: [PATCH 3/3] Removing whitespace before/after nullable pragma --- src/System.Management.Automation/engine/hostifaces/MshHost.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/hostifaces/MshHost.cs b/src/System.Management.Automation/engine/hostifaces/MshHost.cs index 476d00b940d..7ee89d14b12 100644 --- a/src/System.Management.Automation/engine/hostifaces/MshHost.cs +++ b/src/System.Management.Automation/engine/hostifaces/MshHost.cs @@ -286,11 +286,11 @@ public virtual bool DebuggerEnabled } } -#nullable enable /// /// This interface needs to be implemented by PSHost objects that want to support the PushRunspace /// and PopRunspace functionality. /// +#nullable enable public interface IHostSupportsInteractiveSession { ///