Property | Type | Description | |
---|---|---|---|
License | string |
Property | Type | Description | |
---|---|---|---|
AppendFileNameWithQuoting | void | ||
AppendQuotedTextToBuffer | void | ||
AppendSpaceIfNotEmpty | void | ||
AppendTextWithQuoting | void | ||
IsQuotingRequired | bool | ||
VerifyThrowNoEmbeddedDoubleQuotes | void |
Method | Description | |
---|---|---|
AppendFileNameIfNotNull ( string fileName ) : void |
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.
|
|
AppendFileNamesIfNotNull ( string fileNames, string delimiter ) : void |
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.
|
|
AppendSwitch ( string switchName ) : void |
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.
|
|
AppendSwitchIfNotNull ( string switchName, string parameter ) : void |
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.
|
|
AppendSwitchIfNotNull ( string switchName, string parameters, string delimiter ) : void |
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.
|
|
AppendSwitchUnquotedIfNotNull ( string switchName, string parameter ) : void |
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.
|
|
AppendSwitchUnquotedIfNotNull ( string switchName, string parameters, string delimiter ) : void |
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.
|
|
AppendTextUnquoted ( string textToAppend ) : void |
Appends a string. No quotes are added. This method does not append a space to the command line before executing. In the future, this function may fixup 'textToAppend' to handle literal embedded quotes. |
|
CommandLineBuilder ( ) : System |
Default constructor
|
|
CommandLineBuilder ( bool quoteHyphensOnCommandLine ) : System |
Default constructor
|
|
ToString ( ) : string |
Return the command-line as a string.
|
Method | Description | |
---|---|---|
AppendFileNameWithQuoting ( string fileName ) : void |
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. In the future, this function may fixup 'text' to handle literal embedded quotes. |
|
AppendQuotedTextToBuffer ( StringBuilder buffer, string unquotedTextToAppend ) : void |
Appends given text to the buffer after first quoting the text if necessary.
|
|
AppendSpaceIfNotEmpty ( ) : void |
Add a space to the specified string if and only if it's not empty. This is a pretty obscure method and so it's only available to inherited classes. |
|
AppendTextWithQuoting ( string textToAppend ) : void |
Appends a string. Quotes are added if they are needed. This method does not append a space to the command line before executing. Escapes any double quotes in the string. |
|
IsQuotingRequired ( string parameter ) : bool |
Checks the given switch parameter to see if it must/can be quoted.
|
|
VerifyThrowNoEmbeddedDoubleQuotes ( string switchName, string parameter ) : void |
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
|
public AppendFileNameIfNotNull ( string fileName ) : void | ||
fileName | string | File name to append, if it's null this method has no effect |
return | void |
public AppendFileNamesIfNotNull ( string fileNames, string delimiter ) : void | ||
fileNames | string | File names to append, if it's null this method has no effect |
delimiter | string | The delimiter between file names |
return | void |
public AppendSwitch ( string switchName ) : void | ||
switchName | string | The switch to append to the command line, may not be null |
return | void |
public AppendSwitchIfNotNull ( string switchName, string parameter ) : void | ||
switchName | string | The switch to append to the command line, may not be null |
parameter | string | Switch parameter to append, quoted if necessary. If null, this method has no effect. |
return | void |
public AppendSwitchIfNotNull ( string switchName, string parameters, string delimiter ) : void | ||
switchName | string | The switch to append to the command line, may not be null |
parameters | string | Switch parameters to append, quoted if necessary. If null, this method has no effect. |
delimiter | string | Delimiter to put between individual parameters, may not be null (may be empty) |
return | void |
public AppendSwitchUnquotedIfNotNull ( string switchName, string parameter ) : void | ||
switchName | string | The switch to append to the command line, may not be null |
parameter | string | Switch parameter to append, not quoted. If null, this method has no effect. |
return | void |
public AppendSwitchUnquotedIfNotNull ( string switchName, string parameters, string delimiter ) : void | ||
switchName | string | The switch to append to the command line, may not be null |
parameters | string | Switch parameters to append, not quoted. If null, this method has no effect. |
delimiter | string | Delimiter to put between individual parameters, may not be null (may be empty) |
return | void |
public AppendTextUnquoted ( string textToAppend ) : void | ||
textToAppend | string | The string to append |
return | void |
public CommandLineBuilder ( bool quoteHyphensOnCommandLine ) : System | ||
quoteHyphensOnCommandLine | bool | |
return | System |