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
SourceFullName
Gets the full name of the source property path to flatten.
public string SourceFullName { get; }
Property Value
TypeId
public object TypeId { get; }
Property Value
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.