Senpai 1.0.1
Additional Details
Package has moved to maid
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Senpai --version 1.0.1
NuGet\Install-Package Senpai -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Senpai" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Senpai --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Senpai, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Senpai as a Cake Addin #addin nuget:?package=Senpai&version=1.0.1 // Install Senpai as a Cake Tool #tool nuget:?package=Senpai&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Senpai
A simple command handler for cli applications.
Quick Start
using Senpai;
[Command("mycommand", Description = "my command's description.")]
public static void myMethod()
{
// my code
}
static void Main(string[] args)
{
Cli.Initialize(args);
}
Retrieving parameters
There are 2 ways to interact with parameters/arguments that are passed to the cli.
1. Accessing Cli.Args
var array = Cli.Args;
2. The parameters of a method
[Command("mycommand")]
public static void myMethod(int a, string? b, string c = null)
{
// 'b' can have a value or be omitted as double-quotes ("")
// 'c' can have a value or be omitted as nothing
}
Supported Parameter Type
- Int
- Char
- Long
- String
- Double
- Boolean
And nullable of mentioned types.
Note
- Methods decorated with the
Command
attribute must have thepublic
andstatic
modifier. - No support for options/flags, yet. (I'm lazy)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
3.0.0-preview.1 | 129 | 1/27/2023 | |
3.0.0-alpha.2 | 125 | 1/20/2023 | |
3.0.0-alpha.1 | 119 | 1/19/2023 | |
2.0.0 | 470 | 11/5/2022 | |
2.0.0-beta.1.0 | 179 | 6/15/2022 | |
2.0.0-alpha.1.0 | 148 | 6/9/2022 | |
1.0.2 | 516 | 4/5/2022 | |
1.0.1 | 482 | 4/5/2022 | |
1.0.0 | 477 | 4/5/2022 |