Skip to content

IgnoreNonMapped is ignored when using RequireDestinationMemberSource #413

@cytoph

Description

@cytoph

I have the following config:

var config = new TypeAdapterConfig()
{
    // other configuration here
    RequireDestinationMemberSource = true,
};

// other mappings here

config.NewConfig<DataRow, Document>()
    .Map(d => d.Id, dr => dr.Field<int>("Id"))
    .IgnoreNonMapped(true);

When I now use config.Compile() to check the configurations I get an exception that on mapping DataRow to Document all properties (except Id of course) where neither configured to be mapped or ignored. My workaround for now is to use .RequireDestinationMemberSource(false) just for this one mapping, but shouldn't IgnoreNonMapped still work as inteded when using RequireDestinationMemberSource = true?

Sub-issues

Metadata

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