Skip to content

Explicit named mappings #1855

@latonz

Description

@latonz

Instead of relying solely on method names to resolve mappings, it would be beneficial to support explicit mapping names.

[AttributeUsage(AttributeTargets.Method)]
public class NamedMappingAttribute : Attribute
{
    public NamedMappingAttribute(string name);
}

These names should be usable in:

  • MapValueAttribute.Use
  • MapPropertyAttribute.Use
  • MapPropertyFromSourceAttribute.Use
  • IncludeMappingConfigurationAttribute.Name

Follow up of #513 / #1833.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions