mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Add required modifiers
This commit is contained in:
@@ -383,7 +383,7 @@ If the user does not provide value for such option through command line argument
|
||||
public class AuthCommand : ICommand
|
||||
{
|
||||
[CommandOption("token", IsRequired = true, EnvironmentVariable = "AUTH_TOKEN")]
|
||||
public string AuthToken { get; init; }
|
||||
public required string AuthToken { get; init; }
|
||||
|
||||
public ValueTask ExecuteAsync(IConsole console)
|
||||
{
|
||||
@@ -500,10 +500,10 @@ This special exception can be used to print an error message to the console, ret
|
||||
public class DivideCommand : ICommand
|
||||
{
|
||||
[CommandOption("dividend", IsRequired = true)]
|
||||
public double Dividend { get; init; }
|
||||
public required double Dividend { get; init; }
|
||||
|
||||
[CommandOption("divisor", IsRequired = true)]
|
||||
public double Divisor { get; init; }
|
||||
public required double Divisor { get; init; }
|
||||
|
||||
public ValueTask ExecuteAsync(IConsole console)
|
||||
{
|
||||
@@ -727,4 +727,4 @@ var app = new CliApplicationBuilder()
|
||||
## Etymology
|
||||
|
||||
**CliFx** is made out of "Cli" for "Command Line Interface" and "Fx" for "Framework".
|
||||
It's pronounced as "cliff ex".
|
||||
It's pronounced as "cliff ex".
|
||||
Reference in New Issue
Block a user