From 8af18fa4eabca8c86551ea2f7c290786e07f1989 Mon Sep 17 00:00:00 2001 From: Dmitry Volodin Date: Mon, 25 Jul 2022 20:37:32 +0400 Subject: [PATCH] Use compound assignment in /Microsoft.WSMan (#17721) --- src/Microsoft.WSMan.Management/WSManConnections.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Microsoft.WSMan.Management/WSManConnections.cs b/src/Microsoft.WSMan.Management/WSManConnections.cs index c83ed7e9e..cac519674 100644 --- a/src/Microsoft.WSMan.Management/WSManConnections.cs +++ b/src/Microsoft.WSMan.Management/WSManConnections.cs @@ -360,10 +360,7 @@ namespace Microsoft.WSMan.Management protected override void BeginProcessing() { WSManHelper helper = new WSManHelper(this); - if (computername == null) - { - computername = "localhost"; - } + computername ??= "localhost"; if (this.SessionState.Path.CurrentProviderLocation(WSManStringLiterals.rootpath).Path.StartsWith(WSManStringLiterals.rootpath + ":" + WSManStringLiterals.DefaultPathSeparator + computername, StringComparison.OrdinalIgnoreCase)) {