Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1427: Ensure WithProperty registrations consistently allow null values; update nullable annotations #1428

Merged
merged 3 commits into from
Sep 21, 2024

Conversation

tillig
Copy link
Member

@tillig tillig commented Sep 15, 2024

Resolves #1427 by removing the exception check for null when registering a property value using WithProperty(Expression, Value).

As part of this, I found that the base ConstantParameter class used by both constructor and property parameters does allow null as a value to be injected but not all the derived classes had the proper nullable type annotations. I updated the derived classes to consistently annotate the value as allowing null.

Copy link
Member

@alistairjevans alistairjevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🚢

@tillig tillig merged commit e4f1bc6 into develop Sep 21, 2024
1 of 2 checks passed
@tillig tillig deleted the feature/with-property-consistency branch September 21, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent behavior of different RegistrationExtensions.WithProperty overloads regarding nullable properties
2 participants