CsvFileCustomMapperBase Class

Definition

Namespace: DataStandardizer.File.CSV

The base class for an imperative mapper of plain (non-line) model objects. Subclass it to map an arbitrary class to and from CSV lines via the ToObject / ToCsvLine conversions.

Syntax

public abstract class CsvFileCustomMapperBase<TModel> : ICsvFileMapper
    where TModel : class

Remarks

In your subclass constructor, call the protected CsvFileMappingBuilder<TModel> Map() method once per property and chain the fluent CsvFileMappingBuilder pipeline. Pass an instance of the mapper to the ToObject / ToCsvLine extensions on CsvExtensions. Use this base for plain objects; for CsvFileRecordLine-derived models use CsvFileMapperBase instead — the two are not interchangeable.

Every member of the IReadOnlyDictionary<string, CsvFieldMapping> surface is implemented explicitly and is reached through an interface reference.

Methods

Explicit implementation

CsvFileCustomMapperBase implements IReadOnlyDictionary<string, CsvFieldMapping> explicitly; each member is callable only through the corresponding interface reference. (All targets.)

Member Returns Notes
IEnumerable<KeyValuePair<string, CsvFieldMapping>>.GetEnumerator() IEnumerator<KeyValuePair<string, CsvFieldMapping>>  
IEnumerable.GetEnumerator() IEnumerator  
IReadOnlyCollection<KeyValuePair<string, CsvFieldMapping>>.Count int  
IReadOnlyDictionary<string, CsvFieldMapping>.ContainsKey(string key) bool  
IReadOnlyDictionary<string, CsvFieldMapping>.Keys IEnumerable<string>  
IReadOnlyDictionary<string, CsvFieldMapping>.this[string key] CsvFieldMapping  
IReadOnlyDictionary<string, CsvFieldMapping>.TryGetValue(string key, out CsvFieldMapping value) bool  
IReadOnlyDictionary<string, CsvFieldMapping>.Values IEnumerable<CsvFieldMapping>  

Applies to

Targets netstandard1.3, netstandard2.0, net8.0, and net10.0.

See also

</content>


This site uses Just the Docs, a documentation theme for Jekyll.