CsvContext Class
Share state for CsvHelper.
Namespace
CsvHelper
Base Types
  • object
graph BT Type-->Base0["object"] Type["CsvContext"] class Type type-node

Syntax

public class CsvContext

Constructors

Name Summary
CsvContext(CsvConfiguration) Initializes a new instance of the CsvContext class.
CsvContext(IParser) Initializes a new instance of the CsvContext class.
CsvContext(IReader) Initializes a new instance of the CsvContext class.
CsvContext(IWriter) Initializes a new instance of the CsvContext class.

Properties

Name Property Type Summary
Configuration CsvConfiguration
Gets the configuration.
Maps ClassMapCollection
The configured ClassMaps.
Parser IParser
Gets the parser.
Reader IReader
Gets the reader.
TypeConverterCache TypeConverterCache
Gets or sets the TypeConverterOptionsCache.
TypeConverterOptionsCache TypeConverterOptionsCache
Gets or sets the TypeConverterOptionsCache.
Writer IWriter
Gets the writer.

Methods

Name Return Value Summary
AutoMap(Type) ClassMap
Generates a ClassMap for the type.
AutoMap<T>() ClassMap<T>
Generates a ClassMap for the type.
RegisterClassMap(ClassMap) void
Registers the class map.
RegisterClassMap(Type) ClassMap
Use a ClassMap<TClass> to configure mappings. When using a class map, no members are mapped by default. Only members specified in the mapping are used.
RegisterClassMap<TMap>() TMap
Use a ClassMap<TClass> to configure mappings. When using a class map, no members are mapped by default. Only member specified in the mapping are used.
UnregisterClassMap() void
Unregisters all class maps.
UnregisterClassMap(Type) void
Unregisters the class map.
UnregisterClassMap<TMap>() void
Unregisters the class map.