Skip to content

Provides a command line arguments builder, methods to run executables and extract outputs, etc.

Notifications You must be signed in to change notification settings

Heleonix/Heleonix.Execution

Repository files navigation

Heleonix.Execution

Release: .NET / NuGet

Provides a command line arguments builder, methods to run executables and extract outputs, etc.

Install

https://www.nuget.org/packages/Heleonix.Execution

Documentation

See Heleonix.Execution

Examples

ExeHelper

var result = ExeHelper.Execute(
    @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe",
    "--app=http://www.google.com --window-size=300,300 --new-window",
    true,
    string.Empty,
    2000);

Console.WriteLine(result.ExitCode); // An exit code: value returned by `Main` or by `Environment.Exit(exitCode)` etc.
Console.WriteLine(result.Output); // Output like `Console.WriteLine` is available here
Console.WriteLine(result.Error); // Output like `Console.Error.WriteLine` is available here.

ArgsBuilder

var canAddArguments = true;

var args = ArgsBuilder.By("--", "=", valueSeparator: ",").AddArguments("key", new[] { "111", "222", false, canAddArguments);

var multipleArgs = ArgsBuilder.By("--", "=").AddArguments("key", new[] { "111", "222", true, canAddArguments);

// args: "--key=111,222"

// multipleArgs: "--key=111 --key=222".

Contribution Guideline

  1. Create a fork from the main repository

  2. Implement whatever is needed

  3. Create a Pull Request. Make sure the assigned Checks pass successfully. You can watch the progress in the PR: .NET GitHub workflows

  4. Request review from the code owner

  5. Once approved, merge your Pull Request via Squash and merge

    IMPORTANT
    While merging, enter a Conventional Commits commit message. This commit message will be used in automatically generated Github Release Notes and NuGet Release Notes

  6. Monitor the Release: .NET / NuGet GitHub workflow to make sure your changes are delivered successfully

  7. In case of any issues, please contact heleonix.sln@gmail.com

About

Provides a command line arguments builder, methods to run executables and extract outputs, etc.

Topics

Resources

Stars

Watchers

Forks