Skip to content

Improve nullability annotations on the Adapt extension method #797

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

Closed
wants to merge 1 commit into from

Conversation

hmoratopcs
Copy link

This PR introduces nullability annotations. A warning will now be triggered when attempting to map a nullable input to a non-nullable output, for example: ProductDTO dto = ((Product?)null).Adapt<ProductDTO>();

A warning will appear if you try to map a nullable input to a non-nullable result: ` ProductDTO dto = ((Product?)null).Adapt<ProductDTO>();`
@DocSvartz
Copy link

@hmoratopcs please send this PR on develoment branch

@hmoratopcs hmoratopcs changed the base branch from master to development May 2, 2025 06:07
@hmoratopcs hmoratopcs changed the base branch from development to master May 2, 2025 06:07
@hmoratopcs hmoratopcs marked this pull request as draft May 2, 2025 06:08
@hmoratopcs hmoratopcs closed this May 5, 2025
@hmoratopcs
Copy link
Author

Closed in favor of #800, which applies it on development branch.

@hmoratopcs hmoratopcs deleted the patch-2 branch May 5, 2025 17:23
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.

2 participants