CommandLineBuilder.AppendFileNamesIfNotNull CommandLineBuilder.AppendFileNamesIfNotNull CommandLineBuilder.AppendFileNamesIfNotNull CommandLineBuilder.AppendFileNamesIfNotNull Method

Definition

Appends the command line with a list of file names, inserting quotation marks if necessary.

Overloads

AppendFileNamesIfNotNull(ITaskItem[], String) AppendFileNamesIfNotNull(ITaskItem[], String) AppendFileNamesIfNotNull(ITaskItem[], String) AppendFileNamesIfNotNull(ITaskItem[], String)

Appends the command line with the list of file names in the specified ITaskItem array, separated by the specified delimiter.

AppendFileNamesIfNotNull(String[], String) AppendFileNamesIfNotNull(String[], String) AppendFileNamesIfNotNull(String[], String) AppendFileNamesIfNotNull(String[], String)

Appends the command line with the list of file names in the specified string array, separated by the specified delimiter.

AppendFileNamesIfNotNull(ITaskItem[], String) AppendFileNamesIfNotNull(ITaskItem[], String) AppendFileNamesIfNotNull(ITaskItem[], String) AppendFileNamesIfNotNull(ITaskItem[], String)

Appends the command line with the list of file names in the specified ITaskItem array, separated by the specified delimiter.

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

Parameters

fileItems
ITaskItem[]

The task item specifications to append. If the array is null, then this method has no effect.

delimiter
String String String String

The delimiter to put between task item specifications in the command line.

Examples

See example in AppendFileNamesIfNotNull.

Remarks

This method appends the command line with file names, and surrounds the file names with quotation marks as necessary. The file names are separated by the specified delimiter.

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

AppendFileNamesIfNotNull(String[], String) AppendFileNamesIfNotNull(String[], String) AppendFileNamesIfNotNull(String[], String) AppendFileNamesIfNotNull(String[], String)

Appends the command line with the list of file names in the specified string array, separated by the specified delimiter.

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

Parameters

fileNames
String[]

The file names to append. If the array is null, then this method has no effect.

delimiter
String String String String

The delimiter to put between file names in the command line.

Examples

AppendFileNamesIfNotNull(new string[] {"Alpha.cs", "Beta.cs"}, ",") yields Alpha.cs,Beta.cs.

Remarks

This method appends the command line with file names, and surrounds the file names with quotation marks as necessary. The file names are separated by the specified delimiter.

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

Applies to