C# 클래스 Mono.Csv.CsvFileReader

Class for reading from comma-separated-value (CSV) files
상속: CsvFileCommon, IDisposable
파일 보기 프로젝트 열기: floatinghotpot/LiteCsvParser 1 사용 예제들

공개 메소드들

메소드 설명
CsvFileReader ( Stream stream, EmptyLineBehavior emptyLineBehavior = EmptyLineBehavior.NoColumns ) : System

Initializes a new instance of the CsvFileReader class for the specified stream.

CsvFileReader ( StreamReader reader, EmptyLineBehavior emptyLineBehavior = EmptyLineBehavior.NoColumns ) : System

Initializes a new instance of the CsvFileReader class for the specified stream.

CsvFileReader ( string path, EmptyLineBehavior emptyLineBehavior = EmptyLineBehavior.NoColumns ) : System

Initializes a new instance of the CsvFileReader class for the specified file path.

Dispose ( ) : void
ReadAll ( string path, Encoding encoding ) : List>
ReadAll ( List dataGrid ) : bool
ReadRow ( List columns ) : bool

Reads a row of columns from the current CSV file. Returns false if no more data could be read because the end of the file was reached.

비공개 메소드들

메소드 설명
ReadQuotedColumn ( ) : string

Reads a quoted column by reading from the current line until a closing quote is found or the end of the file is reached. On return, the current position points to the delimiter or the end of the last line in the file. Note: CurrLine may be set to null on return.

ReadUnquotedColumn ( ) : string

Reads an unquoted column by reading from the current line until a delimiter is found or the end of the line is reached. On return, the current position points to the delimiter or the end of the current line.

메소드 상세

CsvFileReader() 공개 메소드

Initializes a new instance of the CsvFileReader class for the specified stream.
public CsvFileReader ( Stream stream, EmptyLineBehavior emptyLineBehavior = EmptyLineBehavior.NoColumns ) : System
stream Stream The stream to read from
emptyLineBehavior EmptyLineBehavior Determines how empty lines are handled
리턴 System

CsvFileReader() 공개 메소드

Initializes a new instance of the CsvFileReader class for the specified stream.
public CsvFileReader ( StreamReader reader, EmptyLineBehavior emptyLineBehavior = EmptyLineBehavior.NoColumns ) : System
reader System.IO.StreamReader
emptyLineBehavior EmptyLineBehavior Determines how empty lines are handled
리턴 System

CsvFileReader() 공개 메소드

Initializes a new instance of the CsvFileReader class for the specified file path.
public CsvFileReader ( string path, EmptyLineBehavior emptyLineBehavior = EmptyLineBehavior.NoColumns ) : System
path string The name of the CSV file to read from
emptyLineBehavior EmptyLineBehavior Determines how empty lines are handled
리턴 System

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

ReadAll() 공개 정적인 메소드

public static ReadAll ( string path, Encoding encoding ) : List>
path string
encoding System.Text.Encoding
리턴 List>

ReadAll() 공개 메소드

public ReadAll ( List dataGrid ) : bool
dataGrid List
리턴 bool

ReadRow() 공개 메소드

Reads a row of columns from the current CSV file. Returns false if no more data could be read because the end of the file was reached.
public ReadRow ( List columns ) : bool
columns List Collection to hold the columns read
리턴 bool