chore: add project readme to describe the project
All checks were successful
default / default (8.0) (push) Successful in 53s
All checks were successful
default / default (8.0) (push) Successful in 53s
This commit is contained in:
parent
b7517a7fee
commit
bd51e1cbbf
2 changed files with 51 additions and 0 deletions
|
@ -9,6 +9,8 @@
|
||||||
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
|
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||||
<PackageVersion Include="NUnit.Analyzers" Version="4.1.0" />
|
<PackageVersion Include="NUnit.Analyzers" Version="4.1.0" />
|
||||||
<PackageVersion Include="coverlet.collector" Version="6.0.1" />
|
<PackageVersion Include="coverlet.collector" Version="6.0.1" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
<PackageVersion Include="Spectre.Console" Version="0.49.1" />
|
<PackageVersion Include="Spectre.Console" Version="0.49.1" />
|
||||||
<PackageVersion Include="Spectre.Console.Cli" Version="0.49.1" />
|
<PackageVersion Include="Spectre.Console.Cli" Version="0.49.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
49
README.md
Normal file
49
README.md
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# `Geekeey.Extensions.Process`
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
|
||||||
|
### Install the NuGet package:
|
||||||
|
|
||||||
|
```
|
||||||
|
dotnet add package Geekeey.Extensions.Process
|
||||||
|
```
|
||||||
|
|
||||||
|
You may need to add our NuGet Feed to your `nuget.config` this can be done by adding the following lines
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<packageSources>
|
||||||
|
<add key="geekeey" value="https://git.geekeey.de/api/packages/geekeey/nuget/index.json" />
|
||||||
|
</packageSources>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Configure
|
||||||
|
|
||||||
|
The package adds a global using for the functions in the `Prelude` class when the `ImplicitUsings` is enabled in
|
||||||
|
the `.csproj` file. This global using is recommended but can also be removed, by removing
|
||||||
|
the `Geekeey.Extensions.Process.Prelude` value from the item group `<Usings>`. For more information about that see
|
||||||
|
the `Project.props` file inside the project tree.
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
public static Task<int> Main()
|
||||||
|
{
|
||||||
|
var stdout = new StringBuilder();
|
||||||
|
var cmd = Run("git").WithArguments(["config", "--get", "user.name"]) | stdout;
|
||||||
|
await cmd.ExecuteAsync();
|
||||||
|
Console.WriteLine(stdout.ToString());
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
public static Task<int> Main()
|
||||||
|
{
|
||||||
|
var cmd = Run("cat").WithArguments(["file.txt"]) | Run("wc");
|
||||||
|
await cmd.ExecuteAsync();
|
||||||
|
Console.WriteLine(stdout.ToString());
|
||||||
|
}
|
||||||
|
```
|
Loading…
Reference in a new issue