CommandLineBuilder.AppendSwitchUnquotedIfNotNull CommandLineBuilder.AppendSwitchUnquotedIfNotNull CommandLineBuilder.AppendSwitchUnquotedIfNotNull CommandLineBuilder.AppendSwitchUnquotedIfNotNull Method

Definition

Appends the command line with a switch, without attempting to encapsulate the switch parameters with quotation marks.

Overloads

AppendSwitchUnquotedIfNotNull(String, ITaskItem) AppendSwitchUnquotedIfNotNull(String, ITaskItem) AppendSwitchUnquotedIfNotNull(String, ITaskItem) AppendSwitchUnquotedIfNotNull(String, ITaskItem)

Appends the command line with a switch that takes a task item specification as a single string parameter, without attempting to encapsulate the switch parameter with quotation marks.

AppendSwitchUnquotedIfNotNull(String, String) AppendSwitchUnquotedIfNotNull(String, String) AppendSwitchUnquotedIfNotNull(String, String) AppendSwitchUnquotedIfNotNull(String, String)

Appends the command line with a switch that takes a single string parameter, without attempting to encapsulate the switch parameter with quotation marks.

AppendSwitchUnquotedIfNotNull(String, ITaskItem[], String) AppendSwitchUnquotedIfNotNull(String, ITaskItem[], String) AppendSwitchUnquotedIfNotNull(String, ITaskItem[], String) AppendSwitchUnquotedIfNotNull(String, ITaskItem[], String)

Appends the command line with a switch that takes an array of task item specifications that act as string parameters, without attempting to encapsulate them with quotation marks.

AppendSwitchUnquotedIfNotNull(String, String[], String) AppendSwitchUnquotedIfNotNull(String, String[], String) AppendSwitchUnquotedIfNotNull(String, String[], String) AppendSwitchUnquotedIfNotNull(String, String[], String)

Appends the command line with a switch that takes an array of string parameters, without attempting to encapsulate switch parameters with quotation marks.

AppendSwitchUnquotedIfNotNull(String, ITaskItem) AppendSwitchUnquotedIfNotNull(String, ITaskItem) AppendSwitchUnquotedIfNotNull(String, ITaskItem) AppendSwitchUnquotedIfNotNull(String, ITaskItem)

Appends the command line with a switch that takes a task item specification as a single string parameter, without attempting to encapsulate the switch parameter with quotation marks.

public:
 void AppendSwitchUnquotedIfNotNull(System::String ^ switchName, Microsoft::Build::Framework::ITaskItem ^ parameter);
public void AppendSwitchUnquotedIfNotNull (string switchName, Microsoft.Build.Framework.ITaskItem parameter);
member this.AppendSwitchUnquotedIfNotNull : string * Microsoft.Build.Framework.ITaskItem -> unit
Public Sub AppendSwitchUnquotedIfNotNull (switchName As String, parameter As ITaskItem)

Parameters

switchName
String String String String

The name of the switch to append to the command line. This value cannot be null.

parameter
ITaskItem ITaskItem ITaskItem ITaskItem

The switch parameter to append to the command line. Quotation marks will not be added. If this value is null, then this method has no effect.

Examples

See example in AppendSwitchUnquotedIfNotNull.

Remarks

If the command line is not empty, then this method also appends the command line with a space, before the switch.

AppendSwitchUnquotedIfNotNull(String, String) AppendSwitchUnquotedIfNotNull(String, String) AppendSwitchUnquotedIfNotNull(String, String) AppendSwitchUnquotedIfNotNull(String, String)

Appends the command line with a switch that takes a single string parameter, without attempting to encapsulate the switch parameter with quotation marks.

public:
 void AppendSwitchUnquotedIfNotNull(System::String ^ switchName, System::String ^ parameter);
public void AppendSwitchUnquotedIfNotNull (string switchName, string parameter);
member this.AppendSwitchUnquotedIfNotNull : string * string -> unit
Public Sub AppendSwitchUnquotedIfNotNull (switchName As String, parameter As String)

Parameters

switchName
String String String String

The name of the switch to append to the command line. This value cannot be null.

parameter
String String String String

The switch parameter to append to the command line. Quotation marks will not be added. If this value is null, then this method has no effect.

Examples

AppendSwitchUnquotedIfNotNull("/source:", "File Name.cs") yields /source:File Name.cs.

Remarks

If the command line is not empty, then this method also appends the command line with a space, before the switch.

AppendSwitchUnquotedIfNotNull(String, ITaskItem[], String) AppendSwitchUnquotedIfNotNull(String, ITaskItem[], String) AppendSwitchUnquotedIfNotNull(String, ITaskItem[], String) AppendSwitchUnquotedIfNotNull(String, ITaskItem[], String)

Appends the command line with a switch that takes an array of task item specifications that act as string parameters, without attempting to encapsulate them with quotation marks.

public:
 void AppendSwitchUnquotedIfNotNull(System::String ^ switchName, cli::array <Microsoft::Build::Framework::ITaskItem ^> ^ parameters, System::String ^ delimiter);
public void AppendSwitchUnquotedIfNotNull (string switchName, Microsoft.Build.Framework.ITaskItem[] parameters, string delimiter);
member this.AppendSwitchUnquotedIfNotNull : string * Microsoft.Build.Framework.ITaskItem[] * string -> unit
Public Sub AppendSwitchUnquotedIfNotNull (switchName As String, parameters As ITaskItem(), delimiter As String)

Parameters

switchName
String String String String

The name of the switch to append to the command line. This value cannot be null.

parameters
ITaskItem[]

An array of switch parameters to append to the command line. Quotation marks will not be added. If the array is null, then this method has no effect.

delimiter
String String String String

The delimiter that separates individual parameters. This value can be empty, but it cannot be null.

Examples

See example in AppendSwitchUnquotedIfNotNull.

Remarks

If the command line is not empty, then this method also appends the command line with a space, before the switch.

AppendSwitchUnquotedIfNotNull(String, String[], String) AppendSwitchUnquotedIfNotNull(String, String[], String) AppendSwitchUnquotedIfNotNull(String, String[], String) AppendSwitchUnquotedIfNotNull(String, String[], String)

Appends the command line with a switch that takes an array of string parameters, without attempting to encapsulate switch parameters with quotation marks.

public:
 void AppendSwitchUnquotedIfNotNull(System::String ^ switchName, cli::array <System::String ^> ^ parameters, System::String ^ delimiter);
public void AppendSwitchUnquotedIfNotNull (string switchName, string[] parameters, string delimiter);
member this.AppendSwitchUnquotedIfNotNull : string * string[] * string -> unit
Public Sub AppendSwitchUnquotedIfNotNull (switchName As String, parameters As String(), delimiter As String)

Parameters

switchName
String String String String

The name of the switch to append to the command line. This value cannot be null.

parameters
String[]

An array of switch parameters to append to the command line. Quotation marks will not be added. If the array is null, then this method has no effect.

delimiter
String String String String

The delimiter that separates individual parameters. This value can be empty, but it cannot be null.

Examples

AppendSwitchUnquotedIfNotNull("/sources:", new string[] {"Alpha.cs", "Be ta.cs"}, ";") yields /sources:Alpha.cs;Be ta.cs.

Remarks

If the command line is not empty, then this method also appends the command line with a space, before the switch.

Applies to