Compare commits
No commits in common. "a6f1140b1f114184a82bf1742d3c3096f1a4424c" and "d5629a49a9b3623a9452edbfb2f1954e6a588b78" have entirely different histories.
a6f1140b1f
...
d5629a49a9
45 changed files with 49 additions and 70 deletions
|
|
@ -5,7 +5,7 @@ indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
tab_width = 4
|
tab_width = 4
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
insert_final_newline = true
|
insert_final_newline = false
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
max_line_length = 120
|
max_line_length = 120
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,4 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.CommandLine" PrivateAssets="compile" />
|
<PackageReference Include="System.CommandLine" PrivateAssets="compile" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
|
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
|
||||||
<InternalsVisibleTo Include="Geekeey.Process.Tests" />
|
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,29 +1,9 @@
|
||||||
Process is a library for interacting with external command-line interfaces. It provides a convenient model for launching
|
Process is a library for interacting with external command-line interfaces. It provides a convenient model for launching
|
||||||
processes, redirecting input and output streams, awaiting completion, handling cancellation, and more.
|
processes, redirecting input and output streams, awaiting completion, handling cancellation, and more.
|
||||||
|
|
||||||
## Features
|
## Usage
|
||||||
|
|
||||||
- **Input and Output redirection:** flexible piping model, that allows to redirect the process's streams.
|
### Execute a command and capturing its output:
|
||||||
- **Immutability:** The `Command` object is immutable, ensuring thread safely and allowing sharing of a base
|
|
||||||
configuration.
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
### Install the NuGet package:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dotnet add package Geekeey.Request
|
|
||||||
```
|
|
||||||
|
|
||||||
You may need to add our NuGet feed to your nuget.config this can be done by running the following command:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dotnet nuget add source -n geekeey https://code.geekeey.de/api/packages/geekeey/nuget/index.json
|
|
||||||
```
|
|
||||||
|
|
||||||
### Usage
|
|
||||||
|
|
||||||
#### Execute a command and capturing its output:
|
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
public static async Task<int> Main()
|
public static async Task<int> Main()
|
||||||
|
|
@ -36,7 +16,7 @@ public static async Task<int> Main()
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Execute a command and redirect its output to another command:
|
### Execute a command and redirect its output to another command:
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
public static Task<int> Main()
|
public static Task<int> Main()
|
||||||
|
|
@ -47,7 +27,7 @@ public static Task<int> Main()
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Execute a command with cancellation support:
|
### Execute a command with cancellation support:
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
public static async Task<int> Main()
|
public static async Task<int> Main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue