Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions src/System.Management.Automation/engine/hostifaces/PSCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ internal PSCommand(Command command)
/// current state.
/// </exception>
/// <returns>
/// A PSCommand instance with <paramref name="cmdlet"/> added.
/// A PSCommand instance with <paramref name="command"/> added.
/// </returns>
/// <remarks>
/// This method is not thread safe.
Expand Down Expand Up @@ -151,15 +151,15 @@ public PSCommand AddCommand(string cmdlet, bool useLocalScope)
/// Add a piece of script to construct a command pipeline.
/// For example, to construct a command string "get-process | foreach { $_.Name }"
/// <code>
/// PSCommand command = new PSCommand("get-process").
/// AddCommand("foreach { $_.Name }", true);
/// PSCommand command = new PSCommand("get-process")
/// .AddScript("foreach { $_.Name }", true);
/// </code>
/// </summary>
/// <param name="script">
/// A string representing the script.
/// </param>
/// <returns>
/// A PSCommand instance with <paramref name="command"/> added.
/// A PSCommand instance with <paramref name="script"/> added.
/// </returns>
/// <remarks>
/// This method is not thread-safe.
Expand Down Expand Up @@ -193,8 +193,8 @@ public PSCommand AddScript(string script)
/// Add a piece of script to construct a command pipeline.
/// For example, to construct a command string "get-process | foreach { $_.Name }"
/// <code>
/// PSCommand command = new PSCommand("get-process").
/// AddCommand("foreach { $_.Name }", true);
/// PSCommand command = new PSCommand("get-process")
/// .AddScript("foreach { $_.Name }", true);
/// </code>
/// </summary>
/// <param name="script">
Expand All @@ -204,7 +204,7 @@ public PSCommand AddScript(string script)
/// if true local scope is used to run the script command.
/// </param>
/// <returns>
/// A PSCommand instance with <paramref name="command"/> added.
/// A PSCommand instance with <paramref name="script"/> added.
/// </returns>
/// <remarks>
/// This method is not thread-safe.
Expand Down Expand Up @@ -276,8 +276,9 @@ public PSCommand AddCommand(Command command)
/// Add a parameter to the last added command.
/// For example, to construct a command string "get-process | select-object -property name"
/// <code>
/// PSCommand command = new PSCommand("get-process").
/// AddCommand("select-object").AddParameter("property","name");
/// PSCommand command = new PSCommand("get-process")
/// .AddCommand("select-object")
/// .AddParameter("property", "name");
/// </code>
/// </summary>
/// <param name="parameterName">
Expand Down Expand Up @@ -321,8 +322,9 @@ public PSCommand AddParameter(string parameterName, object value)
/// Adds a switch parameter to the last added command.
/// For example, to construct a command string "get-process | sort-object -descending"
/// <code>
/// PSCommand command = new PSCommand("get-process").
/// AddCommand("sort-object").AddParameter("descending");
/// PSCommand command = new PSCommand("get-process")
/// .AddCommand("sort-object")
/// .AddParameter("descending");
/// </code>
/// </summary>
/// <param name="parameterName">
Expand Down Expand Up @@ -383,8 +385,9 @@ internal PSCommand AddParameter(CommandParameter parameter)
/// Adds an argument to the last added command.
/// For example, to construct a command string "get-process | select-object name"
/// <code>
/// PSCommand command = new PSCommand("get-process").
/// AddCommand("select-object").AddParameter("name");
/// PSCommand command = new PSCommand("get-process")
/// .AddCommand("select-object")
/// .AddArgument("name");
/// </code>
/// This will add the value "name" to the positional parameter list of "select-object"
/// cmdlet. When the command is invoked, this value will get bound to positional parameter 0
Expand Down