Skip to content
Discussion options

You must be logged in to vote

You have two options:

  1. Separate the command initialization from execution and use the Command.Arguments property:
var cmd = Cli.Wrap("ffmpeg").WithArguments(...);
var arguments = cmd.Arguments; // string
var result = await cmd.ExecuteBufferedAsync(...);
  1. Build the arguments outside of WithAguments(...):
var arguments = new ArgumentsBuilder().Add(fileName).Add("foo").Build(); // string
var result = await Cli.Wrap("ffmpeg")
    .WithArguments(arguments)
    .ExecuteBufferedAsync(cancellationToken);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ptr727
Comment options

Answer selected by ptr727
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants