Table of Contents

Enum ConstructorPreference

Namespace
ForgeMap
Assembly
ForgeMap.Abstractions.dll

Controls how the generator selects constructors for destination type instantiation.

public enum ConstructorPreference

Fields

Auto = 0

The generator automatically detects when a parameterized constructor is needed to map get-only properties. If all destination properties are settable, the parameterless constructor is preferred. If any get-only properties have matching source properties, the best-matching parameterized constructor is selected. Default behavior.

PreferParameterless = 1

Always prefer the parameterless constructor when available (v1.5 behavior). Get-only properties remain unmapped.