TypeConverterCache Class
Caches ITypeConverters for a given type.
Namespace
CsvHelper.TypeConversion
Base Types
  • object
graph BT Type-->Base0["object"] Type["TypeConverterCache"] class Type type-node

Syntax

public class TypeConverterCache

Constructors

Name Summary
TypeConverterCache() Initializes the TypeConverterCache class.

Methods

Name Return Value Summary
AddConverter(ITypeConverter) void
Adds the given ITypeConverter to all registered types.
AddConverter(Type, ITypeConverter) void
Adds the ITypeConverter for the given System.Type.
AddConverter<T>(ITypeConverter) void
Adds the ITypeConverter for the given System.Type.
AddConverter<T>(TypeConverter<T>) void
Adds the TypeConverter<T> for the given System.Type.
AddConverterFactory(ITypeConverterFactory) void
Adds the ITypeConverterFactory. Factories are queried in order of being added and first factory that handles the type is used for creating the ITypeConverter.
Contains(Type) bool
Determines if there is a converter registered for the given type.
GetConverter(MemberInfo) ITypeConverter
Gets the converter for the given member. If an attribute is found on the member, that will be used, otherwise the cache will be used.
GetConverter(Type) ITypeConverter
Gets the converter for the given System.Type.
GetConverter<T>() ITypeConverter
Gets the converter for the given System.Type.
RemoveConverter(Type) void
Removes the ITypeConverter for the given System.Type.
RemoveConverter<T>() void
Removes the ITypeConverter for the given System.Type.
RemoveConverterFactory(ITypeConverterFactory) void
Removes the ITypeConverterFactory.