Bagikan melalui


CommandLineBuilderExtension Class

Definition

CommandLineBuilder derived class for specialized logic specific to MSBuild tasks

This API supports the product infrastructure and is not intended to be used directly from your code.

public ref class CommandLineBuilderExtension : Microsoft::Build::Utilities::CommandLineBuilder
public class CommandLineBuilderExtension : Microsoft.Build.Utilities.CommandLineBuilder
type CommandLineBuilderExtension = class
    inherit CommandLineBuilder
Public Class CommandLineBuilderExtension
Inherits CommandLineBuilder
Inheritance
CommandLineBuilderExtension

Constructors

CommandLineBuilderExtension()

This API supports the product infrastructure and is not intended to be used directly from your code.

Initializes a new instance of the CommandLineBuilderExtension class.

CommandLineBuilderExtension(Boolean, Boolean)

Initializes a new instance of the CommandLineBuilderExtension class.

Properties

CommandLine

Retrieves the private StringBuilder instance for inheriting classes

(Inherited from CommandLineBuilder)
Length

Returns the length of the current command

(Inherited from CommandLineBuilder)

Methods

AppendFileNameIfNotNull(ITaskItem)

Appends a file name quoting it if necessary. This method appends a space to the command line (if it's not currently empty) before the file name.

(Inherited from CommandLineBuilder)
AppendFileNameIfNotNull(String)

Appends a file name quoting it if necessary. This method appends a space to the command line (if it's not currently empty) before the file name.

(Inherited from CommandLineBuilder)
AppendFileNamesIfNotNull(ITaskItem[], String)

Appends array of ITaskItem specs as file names, quoting them if necessary, delimited by a delimiter. This method appends a space to the command line (if it's not currently empty) before the file names.

(Inherited from CommandLineBuilder)
AppendFileNamesIfNotNull(String[], String)

Appends array of file name strings, quoting them if necessary, delimited by a delimiter. This method appends a space to the command line (if it's not currently empty) before the file names.

(Inherited from CommandLineBuilder)
AppendFileNameWithQuoting(String)

Appends a file name. Quotes are added if they are needed. If the first character of the file name is a dash, "." is prepended to avoid confusing the file name with a switch This method does not append a space to the command line before executing.

(Inherited from CommandLineBuilder)
AppendQuotedTextToBuffer(StringBuilder, String)

Appends given text to the buffer after first quoting the text if necessary.

(Inherited from CommandLineBuilder)
AppendSpaceIfNotEmpty()

Add a space or newline to the specified string if and only if it's not empty.

(Inherited from CommandLineBuilder)
AppendSwitch(String)

Appends a command-line switch that has no separate value, without any quoting. This method appends a space to the command line (if it's not currently empty) before the switch.

(Inherited from CommandLineBuilder)
AppendSwitchIfNotNull(String, ITaskItem)

Append a switch [overload] This method appends a space to the command line (if it's not currently empty) before the switch.

(Inherited from CommandLineBuilder)
AppendSwitchIfNotNull(String, ITaskItem[], String)

Appends a command-line switch that takes a ITaskItem[] parameter, and add double-quotes around the individual filenames if necessary. This method appends a space to the command line (if it's not currently empty) before the switch.

(Inherited from CommandLineBuilder)
AppendSwitchIfNotNull(String, String)

Appends a command-line switch that takes a single string parameter, quoting the parameter if necessary. This method appends a space to the command line (if it's not currently empty) before the switch.

(Inherited from CommandLineBuilder)
AppendSwitchIfNotNull(String, String[], String)

Appends a command-line switch that takes a string[] parameter, and add double-quotes around the individual filenames if necessary. This method appends a space to the command line (if it's not currently empty) before the switch.

(Inherited from CommandLineBuilder)
AppendSwitchUnquotedIfNotNull(String, ITaskItem)

Appends the literal parameter without trying to quote. This method appends a space to the command line (if it's not currently empty) before the switch.

(Inherited from CommandLineBuilder)
AppendSwitchUnquotedIfNotNull(String, ITaskItem[], String)

Appends a command-line switch that takes a ITaskItem[] parameter, not quoting the individual parameters This method appends a space to the command line (if it's not currently empty) before the switch.

(Inherited from CommandLineBuilder)
AppendSwitchUnquotedIfNotNull(String, String)

Appends the literal parameter without trying to quote. This method appends a space to the command line (if it's not currently empty) before the switch.

(Inherited from CommandLineBuilder)
AppendSwitchUnquotedIfNotNull(String, String[], String)

Appends a command-line switch that takes a string[] parameter, not quoting the individual parameters This method appends a space to the command line (if it's not currently empty) before the switch.

(Inherited from CommandLineBuilder)
AppendTextUnquoted(String)

Appends a string. No quotes are added. This method does not append a space to the command line before executing.

(Inherited from CommandLineBuilder)
AppendTextWithQuoting(String)

Appends a string. Quotes are added if they are needed. This method does not append a space to the command line before executing.

(Inherited from CommandLineBuilder)
GetQuotedText(String)

This API supports the product infrastructure and is not intended to be used directly from your code.

Returns a quoted string appropriate for appending to a command line.

IsQuotingRequired(String)

Checks the given switch parameter to see if it must/can be quoted.

(Inherited from CommandLineBuilder)
ToString()

Return the command-line as a string.

(Inherited from CommandLineBuilder)
VerifyThrowNoEmbeddedDoubleQuotes(String, String)

Throws if the parameter has a double-quote in it. This is used to prevent parameter injection. It's virtual so that tools can override this method if they want to have quotes escaped in filenames

(Inherited from CommandLineBuilder)

Applies to