From 09f54713466f6c2ada2741d15c84984d24581383 Mon Sep 17 00:00:00 2001 From: Ilya Date: Fri, 5 Oct 2018 09:31:32 +0500 Subject: [PATCH] Use params in ImportPSModule (#7933) --- .../engine/InitialSessionState.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/InitialSessionState.cs b/src/System.Management.Automation/engine/InitialSessionState.cs index 701d9f0a85..8c4cc0d0e2 100644 --- a/src/System.Management.Automation/engine/InitialSessionState.cs +++ b/src/System.Management.Automation/engine/InitialSessionState.cs @@ -1842,10 +1842,13 @@ namespace System.Management.Automation.Runspaces /// /// The modules to add /// - public void ImportPSModule(string[] name) + public void ImportPSModule(params string[] name) { if (name == null) + { throw new ArgumentNullException("name"); + } + foreach (string n in name) { ModuleSpecificationsToImport.Add(new ModuleSpecification(n));