Code Monkey home page Code Monkey logo

heleonix.execution's Introduction

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 [email protected]

heleonix.execution's People

Contributors

hennadiilu avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

hennadiilu

heleonix.execution's Issues

Implement ArgsParser to parse command-line arguments into keys and values

Having a class ArgsParser in addition to the existing ArgsBuilder would bring more useful functionality into this library.
The ArgsParser class could be a simple solution to split passed command line arguments string[] args by following the same concepts as the ArgsBuilder. The idea is to have simple to use solution, as opposite to existing approaches, like creation of object model classes, deserializers, wrapping of the Main method etc.
Detailed API of the class:
TBD.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.