Skip to main content

MapPropertyAttribute

Namespace: Riok.Mapperly.Abstractions

Specifies options for a property mapping.

public sealed class MapPropertyAttribute : System.Attribute

Inheritance ObjectAttributeMapPropertyAttribute

Properties

Source

Gets the name of the source property.

public IReadOnlyCollection<string> Source { get; }

Property Value

IReadOnlyCollection<String>

SourceFullName

Gets the full name of the source property path.

public string SourceFullName { get; }

Property Value

String

Target

Gets the name of the target property.

public IReadOnlyCollection<string> Target { get; }

Property Value

IReadOnlyCollection<String>

TargetFullName

Gets the full name of the target property path.

public string TargetFullName { get; }

Property Value

String

TypeId

public object TypeId { get; }

Property Value

Object

Constructors

MapPropertyAttribute(String, String)

Maps a specified source property to the specified target property.

public MapPropertyAttribute(string source, string target)

Parameters

source String
The name of the source property. The use of nameof() is encouraged. A path can be specified by joining property names with a '.'.

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 '.'.

MapPropertyAttribute(String[], String[])

Maps a specified source property to the specified target property.

public MapPropertyAttribute(String[] source, String[] target)

Parameters

source String[]
The path of the source property. The use of nameof() is encouraged.

target String[]
The path of the target property. The use of nameof() is encouraged.