Riok.Mapperly by Mapperly Contributors, Lars Tönz, Manuel Allenspach

<PackageReference Include="Riok.Mapperly" Version="4.1.0-next.1" />

 MapValueAttribute

public sealed class MapValueAttribute : Attribute
Specifies a constant value mapping.
public IReadOnlyCollection<string> Target { get; }

Gets the name of the target property.

public string TargetFullName { get; }

Gets the full name of the target property path.

public string Use { get; set; }

Gets or sets the method name of the method which generates the value to be assigned to Target. Either this property or Value needs to be set. The return type of the referenced method must exactly match the type of Target and needs to be parameterless. The usage of nameof is encouraged.

public object Value { get; }

Gets the value to be assigned to Target.

public MapValueAttribute(string target, object value)

Maps a constant value to a target member.

public MapValueAttribute(string[] target, object value)

Maps a constant value to a target member.

public MapValueAttribute(string target)

Maps a method generated value to a target member. Requires the usage of the Use property.

public MapValueAttribute(string[] target)

Maps a method generated value to a target member. Requires the usage of the Use property.