C# 클래스 CoreTechs.Common.Text.CsvParsingExtensions

파일 보기 프로젝트 열기: Core-Techs/Common

공개 메소드들

메소드 설명
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