Skip to content

Limit which constructors can be used #2691

@lxalln

Description

@lxalln

AutoMapper will quite happily use any/all constructors when determining how to construct an object, even private/internal ones.

I propose a setting (however deeply buried), that allows the setting of a required minimum scope. There are times where I have an empty private/internal constructor and really don't want that to be called.

I don't want to have explicity set the constructor to use in all of my mappings.

Is there any appetite for this, if so, I'll take a look at putting a PR together.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions