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

Tweaking null propagation easily #740

Open
brgrz opened this issue Dec 11, 2024 · 1 comment
Open

Tweaking null propagation easily #740

brgrz opened this issue Dec 11, 2024 · 1 comment

Comments

@brgrz
Copy link

brgrz commented Dec 11, 2024

Is there an easy way to change how null propagation works?

  1. If we wanted to throw an exception when null reference encountered? There are lots of various Ignore methods, similarly I wish there were Required methods or maybe an ThrowIfNull argument to be passed in
  2. If null encountered, use a provided value (I know atm it uses default or null value)
@DocSvartz
Copy link

DocSvartz commented Jan 5, 2025

Hello @brgrz
Do you want to prevent null leaking from Source to Destination?

From this case:

  1. If null encountered, use a provided value (I know atm it uses default or null value)

Maybe it will help you Mapping with condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants