mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 00:42:51 +08:00
Add another missing nullables
This commit is contained in:
parent
974aa1afda
commit
8ae3d258e4
@ -18,7 +18,7 @@ public sealed class MyCommandSettings : CommandSettings
|
|||||||
public string? Name { get; set; }
|
public string? Name { get; set; }
|
||||||
|
|
||||||
[CommandOption("-c|--count")]
|
[CommandOption("-c|--count")]
|
||||||
public int Count { get; set; }
|
public int? Count { get; set; }
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ There is a special mode for `CommandOptions` on boolean types. Typically all `Co
|
|||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
[CommandOption("--debug")]
|
[CommandOption("--debug")]
|
||||||
public bool Debug { get; set; }
|
public bool? Debug { get; set; }
|
||||||
```
|
```
|
||||||
|
|
||||||
### Hidden options
|
### Hidden options
|
||||||
@ -63,7 +63,7 @@ public bool Debug { get; set; }
|
|||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
[CommandOption("--hidden-opt", IsHidden = true)]
|
[CommandOption("--hidden-opt", IsHidden = true)]
|
||||||
public bool HiddenOpt { get; set; }
|
public bool? HiddenOpt { get; set; }
|
||||||
```
|
```
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
@ -109,7 +109,7 @@ public class Settings : CommandSettings
|
|||||||
|
|
||||||
[Description("The name to display")]
|
[Description("The name to display")]
|
||||||
[CommandArgument(0, "[Name]")]
|
[CommandArgument(0, "[Name]")]
|
||||||
public string Name { get; }
|
public string? Name { get; }
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ public class Settings : CommandSettings
|
|||||||
{
|
{
|
||||||
[Description("The name to display")]
|
[Description("The name to display")]
|
||||||
[CommandArgument(0, "[Name]")]
|
[CommandArgument(0, "[Name]")]
|
||||||
public string Name { get; init; }
|
public string? Name { get; init; }
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ public class Settings : CommandSettings
|
|||||||
{
|
{
|
||||||
[Description("The name to display")]
|
[Description("The name to display")]
|
||||||
[CommandArgument(0, "[Name]")]
|
[CommandArgument(0, "[Name]")]
|
||||||
public string Name { get; init; }
|
public string? Name { get; init; }
|
||||||
|
|
||||||
public override ValidationResult Validate()
|
public override ValidationResult Validate()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user