Skip to content

jacksondaw/AsyncProcess

Repository files navigation

Async Process

A simple adapter that allows a process to be executed asynchronously. Developed with .NET Standard 2.0.

Installation

PS> Install-Package AsyncProcess.Net

PS> dotnet add package AsyncProcess.Net

Example

More examples can be found in the test project.

    var tokenSource = new CancellationTokenSource();
    var filename = "C:\Users\jack\Desktop\AwesomeProgram.exe";
    var processTask = new ProcessTask(filename, tokenSource.Token);

    processTask.OutputReceived += (sender, obj) => {
        var args = (DataReceivedEventArgs)obj;
        Console.WriteLine(args.Data);
    };
    
    var exitCode = await processTask.RunAsync();

About

A NuGet for executing a process asynchronously

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages