From 1feed0671afe151ae7aef853d7ec59180ef55b9d Mon Sep 17 00:00:00 2001 From: Staffan Gustafsson Date: Fri, 16 Apr 2021 19:25:15 +0200 Subject: [PATCH] Enable nullable for `System.Management.Automation.Tracing.IMethodInvoker` (#14157) --- .../engine/Modules/ModuleIntrinsics.cs | 1 + .../utils/tracing/IMethodInvoker.cs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs b/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs index 89a8296deb..6ae212655a 100644 --- a/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs +++ b/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs @@ -1715,6 +1715,7 @@ namespace System.Management.Automation NullModuleSpecification, } +#nullable enable /// /// Used by Modules/Snapins to provide a hook to the engine for startup initialization /// w.r.t compiled assembly loading. diff --git a/src/System.Management.Automation/utils/tracing/IMethodInvoker.cs b/src/System.Management.Automation/utils/tracing/IMethodInvoker.cs index daf52e8040..7382380bfb 100644 --- a/src/System.Management.Automation/utils/tracing/IMethodInvoker.cs +++ b/src/System.Management.Automation/utils/tracing/IMethodInvoker.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +#nullable enable + #if !UNIX namespace System.Management.Automation.Tracing @@ -11,7 +13,7 @@ namespace System.Management.Automation.Tracing { Delegate Invoker { get; } - object[] CreateInvokerArgs(Delegate methodToInvoke, object[] methodToInvokeArgs); + object[] CreateInvokerArgs(Delegate methodToInvoke, object?[]? methodToInvokeArgs); } }