UserMappingAttribute
Namespace: Riok.Mapperly.Abstractions
A given method is marked as user implemented mapping with this attribute.
If MapperAttribute.AutoUserMappings is true
,
this attribute allows to ignore a user implemented mapping method.
public sealed class UserMappingAttribute : System.Attribute
Inheritance Object → Attribute → UserMappingAttribute
Attributes AttributeUsageAttribute, ConditionalAttribute
Properties
Default
If set to true
, this user mapping acts as the default mapping for the given type pair.
Only one mapping per type-pair in a mapper can be set to true
.
If no mapping for a given type-pair has a value of true
for UserMappingAttribute.Default
the first mapping encountered without an explicit value of false
is considered the default mapping.
public bool Default { get; set; }
Property Value
Ignore
Whether this user mapping should be ignored.
public bool Ignore { get; set; }
Property Value
TypeId
public object TypeId { get; }
Property Value
Constructors
UserMappingAttribute()
public UserMappingAttribute()