commandlineparser / commandlineparser/commandline
Treat .NET 7 `required` properties as actually required by default
Open
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 478
- PR merge metrics
- No merged PRs in 30d
Description
**Code snippet:**
```cs
public class Options
{
[Option]
public required int Port { get; init; }
[Option]
public required string Server { get; init; }
}
```
**Expected behaviour:** Both `Port` and `Server` are required and the parsing fails if at least on of them is not present.
**Actual behaviour:** They are not required, I still have to specify `[Option(Required = true)]` in order for it to work
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.