MapPropertyFromSourceAttribute
Namespace: Riok.Mapperly.Abstractions
Maps a property from the source object.
public sealed class MapPropertyFromSourceAttribute : System.Attribute
Inheritance Object → Attribute → MapPropertyFromSourceAttribute
Attributes NullableContextAttribute, NullableAttribute, AttributeUsageAttribute, ConditionalAttribute
Properties
Target
Gets the name of the target property.
public IReadOnlyCollection<string> Target { get; }
Property Value
TargetFullName
Gets the full name of the target property path.
public string TargetFullName { get; }
Property Value
StringFormat
Gets or sets the format of the ToString
conversion (implementing IFormattable).
public string StringFormat { get; set; }
Property Value
FormatProvider
Gets or sets the name of a format provider field or property to be used for conversions accepting a format provider (implementing IFormattable). If the default format provider (annotated with FormatProviderAttribute and FormatProviderAttribute.Default) or none (if no default format provider is provided) is used.
public string FormatProvider { get; set; }
Property Value
Use
Reference to a unique named mapping method which should be used to map this member.
public string Use { get; set; }
Property Value
TypeId
public object TypeId { get; }
Property Value
Constructors
MapPropertyFromSourceAttribute(String)
Maps the specified target property from the source object.
public MapPropertyFromSourceAttribute(string target)
Parameters
target
String
The name of the target property. The use of nameof()
is encouraged. A path can be specified by joining property names with a '.'.
MapPropertyFromSourceAttribute(String[])
Maps the specified target property from the source object.
public MapPropertyFromSourceAttribute(String[] target)
Parameters
target
String[]
The path of the target property. The use of nameof()
is encouraged.