Skip to content

Tweaking null propagation easily #740

Open
@brgrz

Description

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)

Activity

DocSvartz

DocSvartz commented on Jan 5, 2025

@DocSvartz

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Tweaking null propagation easily · Issue #740 · MapsterMapper/Mapster