mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-12-16 11:05:44 +00:00
18 lines
586 B
C#
18 lines
586 B
C#
using Instances;
|
|
|
|
namespace FFMpegCore;
|
|
|
|
public static class ProcessArgumentsExtensions
|
|
{
|
|
public static IProcessResult StartAndWaitForExit(this ProcessArguments processArguments)
|
|
{
|
|
using var instance = processArguments.Start();
|
|
return instance.WaitForExit();
|
|
}
|
|
|
|
public static async Task<IProcessResult> StartAndWaitForExitAsync(this ProcessArguments processArguments, CancellationToken cancellationToken = default)
|
|
{
|
|
using var instance = processArguments.Start();
|
|
return await instance.WaitForExitAsync(cancellationToken);
|
|
}
|
|
}
|