Class TypeConverterAttribute
- Namespace
- CsvHelper.Configuration.Attributes
- Assembly
- CsvHelper.dll
Specifies the TypeConverter to use when converting the member to and from a CSV field.
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public class TypeConverterAttribute : Attribute, IMemberMapper, IParameterMapper
- Inheritance
-
TypeConverterAttribute
- Implements
- Inherited Members
Constructors
TypeConverterAttribute(Type)
Specifies the TypeConverter to use when converting the member to and from a CSV field.
public TypeConverterAttribute(Type typeConverterType)
Parameters
typeConverterType
TypeThe type of the ITypeConverter.
TypeConverterAttribute(Type, params object[])
Specifies the TypeConverter to use when converting the member to and from a CSV field.
public TypeConverterAttribute(Type typeConverterType, params object[] constructorArgs)
Parameters
typeConverterType
TypeThe type of the ITypeConverter.
constructorArgs
object[]Type constructor arguments for the type converter.
Properties
TypeConverter
Gets the type converter.
public ITypeConverter TypeConverter { get; }
Property Value
Methods
ApplyTo(MemberMap)
public void ApplyTo(MemberMap memberMap)
Parameters
memberMap
MemberMap
ApplyTo(ParameterMap)
public void ApplyTo(ParameterMap parameterMap)
Parameters
parameterMap
ParameterMap