Skip to main content

MapNestedPropertiesAttribute

Namespace: Riok.Mapperly.Abstractions

Maps all properties from a nested path on the source to the root of the target.

public sealed class MapNestedPropertiesAttribute : System.Attribute

Inheritance Object → Attribute → MapNestedPropertiesAttribute
Attributes NullableContextAttribute, NullableAttribute, AttributeUsageAttribute, ConditionalAttribute

Properties​

Source​

Gets the name of the source property to flatten.

public IReadOnlyCollection<string> Source { get; }

Property Value​

IReadOnlyCollection<String>

SourceFullName​

Gets the full name of the source property path to flatten.

public string SourceFullName { get; }

Property Value​

String

TypeId​

public object TypeId { get; }

Property Value​

Object

Constructors​

MapNestedPropertiesAttribute(String)​

Maps all members of the specified source property to the root of the target.

public MapNestedPropertiesAttribute(string source)

Parameters​

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

MapNestedPropertiesAttribute(String[])​

Maps all members of the specified source property to the root of the target.

public MapNestedPropertiesAttribute(String[] source)

Parameters​

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