Skip to content

Sheller 5.1.1

Compare
Choose a tag to compare
@twitchax twitchax released this 16 Mar 22:03
· 46 commits to master since this release

This release changes:

  • N/A.

This release adds:

  • WithCancellationToken to IShell and IExecutable.
  • ConfigureAwait(false) to all awaits.
  • A bunch more examples to the README.

WithCancellationToken allows the developer to provide cancellation tokens to the execution context.

using (var ctSource = new CancellationTokenSource())
{
    ctSource.CancelAfter(TimeSpan.FromSeconds(5));

    Builder
        .UseShell<Bash>()
        .UseExecutable<Sleep>()
        .WithArgument("5")
        .WithCancellationToken(ctSource.Token)
        .ExecuteAsync();
}