Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Treat .NET 7 required properties as actually required by default #862

Copy link
Copy link
@DoctorKrolic

Description

@DoctorKrolic
Issue body actions

Code snippet:

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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.