commandlineparser / commandlineparser/commandline
Set to true nullable bool arguments without the value
- Lenguaje dominante
- C#
- Estrellas
- 4.8k
- Forks
- 478
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Consider the following class:
```csharp
class Parameters
{
[Option("bool")]
public bool Bool { get; set; }
[Option("nullable-bool")]
public bool? NullableBool { get; set; }
}
```
It works fine for such arguments: `--bool --nullable-bool true` but doesn't work for `--bool --nullable-bool`.
I suggest making it working for nullable bool types.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Reproduce the behavior with the Parameters class shown in the issue, comparing `--bool --nullable-bool true` with `--bool --nullable-bool`. Trace the command-line option parsing path for nullable bool properties; done means `--nullable-bool` sets NullableBool to true without requiring an explicit value, while existing boolean behavior remains intact.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp
- Área
- cli
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 42/100