Beispiel #1
0
 /// <summary>
 /// Applies a file argument. Quotes will surround the file name.
 /// </summary>
 public static ArgumentsBuilder Arg(this ArgumentsBuilder builder, string flag, FileInfo value)
 => builder.Arg(flag, $@"""{value.FullName}""");
Beispiel #2
0
 /// <summary>
 /// Applies a file as a flagless argument value. Quotes will surround the file name.
 /// </summary>
 public static ArgumentsBuilder Value(this ArgumentsBuilder builder, FileInfo value)
 => builder.Value($@"""{value.FullName}""");
Beispiel #3
0
 /// <summary>
 /// Conditionally applies an argument.
 /// </summary>
 public static ArgumentsBuilder ArgIf(this ArgumentsBuilder builder, bool precondition, string flag, string value = null)
 => precondition?builder.Arg(flag, value) : builder;