Skip to main content

FormatProviderAttribute

Namespace: Riok.Mapperly.Abstractions

Marks a property or field as a format provider. A format provider needs to be of a type which implements IFormatProvider and needs to have a getter.

public sealed class FormatProviderAttribute : System.Attribute

Inheritance ObjectAttributeFormatProviderAttribute

Properties

Default

If set to true, this format provider acts as a default format provider and is used for all IFormattable conversions without an explicit MapPropertyAttribute.FormatProvider set. Only one FormatProviderAttribute in a Mapper can be set to true.

public bool Default { get; set; }

Property Value

Boolean

TypeId

public object TypeId { get; }

Property Value

Object

Constructors

FormatProviderAttribute()

public FormatProviderAttribute()