C# Класс CoreTechs.Common.Text.CsvParsingExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
ReadCsv ( this reader, char delimiter = ',', char textQualifier = '"' ) : IEnumerable

Parses delimited text.

This implementation is simple and performs reasonably well. For more features or better performance, CsvHelper is recommended: https://www.nuget.org/packages/CsvHelper/

ReadCsvWithHeader ( this reader, StringComparer fieldKeyComparer = null, char delimiter = ',', char textQualifier = '"' ) : IEnumerable

Parses delimited text. The first row of data should be a header record containing the names of the fields in the following records.

This implementation is simple and performs reasonably well. For more features or better performance, CsvHelper is recommended: https://www.nuget.org/packages/CsvHelper/

Приватные методы

Метод Описание
PreYieldResult ( ICollection data ) : string[]
ShouldYield ( IList result ) : bool
Skip ( this r, int n = 1 ) : void

Описание методов

ReadCsv() публичный статический Метод

Parses delimited text.
This implementation is simple and performs reasonably well. For more features or better performance, CsvHelper is recommended: https://www.nuget.org/packages/CsvHelper/
public static ReadCsv ( this reader, char delimiter = ',', char textQualifier = '"' ) : IEnumerable
reader this The source of character data to parse.
delimiter char The character that separates fields of data.
textQualifier char The character that surrounds field text that may contain the delimiter or the text qualifier itself. For literal occurrences of this character within the field data, the character should be doubled.
Результат IEnumerable

ReadCsvWithHeader() публичный статический Метод

Parses delimited text. The first row of data should be a header record containing the names of the fields in the following records.
This implementation is simple and performs reasonably well. For more features or better performance, CsvHelper is recommended: https://www.nuget.org/packages/CsvHelper/
public static ReadCsvWithHeader ( this reader, StringComparer fieldKeyComparer = null, char delimiter = ',', char textQualifier = '"' ) : IEnumerable
reader this The source of character data to parse.
fieldKeyComparer StringComparer
delimiter char The character that separates fields of data.
textQualifier char The character that surrounds field text that may contain the delimiter or the text qualifier itself. For literal occurrences of this character within the field data, the character should be doubled.
Результат IEnumerable