public CommandLineBuilder AppendDoubleDashIfNotNull( string arg, string val, SeparatorType separatorType, QuoteValue quoteVal) { return((val == null) ? this : AppendDoubleDash(arg, val, separatorType, quoteVal)); }
public CommandLineBuilder AppendDash(string arg, string val, SeparatorType separatorType, QuoteValue quoteVal = QuoteValue.Yes) { _builder.Append("-").Append(arg).Append(GetSeparatorString(separatorType)); AppendQuoted(val, quoteVal); _builder.Append(" "); return(this); }
void AppendQuoted(string val, QuoteValue quoteVal) { if (quoteVal == QuoteValue.Yes) { _builder.Append(@""""); } _builder.Append(val); if (quoteVal == QuoteValue.Yes) { _builder.Append(@""""); } }
public CommandLineBuilder AppendValue(string val, QuoteValue quoteVal = QuoteValue.Yes) { AppendQuoted(val, quoteVal); _builder.Append(" "); return(this); }