From a269af35dd43d6a1b9eb92ce77a90500f7d15174 Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 20 Nov 2020 01:14:42 +0100 Subject: [PATCH 1/3] Enable nullable: System.Management.Automation.IDispatch --- src/System.Management.Automation/engine/COM/ComDispatch.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/System.Management.Automation/engine/COM/ComDispatch.cs b/src/System.Management.Automation/engine/COM/ComDispatch.cs index 3f6afa6440e..1da0d68d272 100644 --- a/src/System.Management.Automation/engine/COM/ComDispatch.cs +++ b/src/System.Management.Automation/engine/COM/ComDispatch.cs @@ -1,10 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using COM = System.Runtime.InteropServices.ComTypes; +#nullable enable + namespace System.Management.Automation { /// @@ -19,7 +22,7 @@ internal interface IDispatch int GetTypeInfoCount(out int info); [PreserveSig] - int GetTypeInfo(int iTInfo, int lcid, out COM.ITypeInfo ppTInfo); + int GetTypeInfo(int iTInfo, int lcid, out COM.ITypeInfo? ppTInfo); void GetIDsOfNames( [MarshalAs(UnmanagedType.LPStruct)] Guid iid, @@ -34,7 +37,7 @@ void Invoke( int lcid, COM.INVOKEKIND wFlags, [In, Out][MarshalAs(UnmanagedType.LPArray)] COM.DISPPARAMS[] paramArray, - out object pVarResult, + out object? pVarResult, out ComInvoker.EXCEPINFO pExcepInfo, out uint puArgErr); } From 9d4ef58eced3c9da67dbfc774a141d5817356bce Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 20 Nov 2020 18:54:48 +0100 Subject: [PATCH 2/3] Removing whitespace before/after nullable pragma --- src/System.Management.Automation/engine/COM/ComDispatch.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/System.Management.Automation/engine/COM/ComDispatch.cs b/src/System.Management.Automation/engine/COM/ComDispatch.cs index 1da0d68d272..1c9ffe3a1e8 100644 --- a/src/System.Management.Automation/engine/COM/ComDispatch.cs +++ b/src/System.Management.Automation/engine/COM/ComDispatch.cs @@ -7,7 +7,6 @@ using COM = System.Runtime.InteropServices.ComTypes; #nullable enable - namespace System.Management.Automation { /// From ace35c31dae204bb4c5b350f3bff63f154422c1a Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Tue, 25 May 2021 23:58:02 +0200 Subject: [PATCH 3/3] Removing ununsed using --- src/System.Management.Automation/engine/COM/ComDispatch.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/System.Management.Automation/engine/COM/ComDispatch.cs b/src/System.Management.Automation/engine/COM/ComDispatch.cs index 1c9ffe3a1e8..8e0417e17cc 100644 --- a/src/System.Management.Automation/engine/COM/ComDispatch.cs +++ b/src/System.Management.Automation/engine/COM/ComDispatch.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System.Diagnostics.CodeAnalysis; using System.Runtime.InteropServices; using COM = System.Runtime.InteropServices.ComTypes;