C# 클래스 Azavea.NijPredictivePolicing.Common.Data.GenericSeparatedValueWriter

a basic implementation of the IDataWriter interface, so we can simply export tab separated value files
상속: IDataFileWriter
파일 보기 프로젝트 열기: azavea/acs-alchemist

보호된 프로퍼티들

프로퍼티 타입 설명
_filename string
_line StringBuilder
_outputStream System.IO.StreamWriter
_splitChars char[]

공개 메소드들

메소드 설명
Close ( ) : bool

closes the underlying stream

CreateTable ( string tablename, IEnumerable columns ) : bool
Flush ( ) : bool

flushes the stream

GenericSeparatedValueWriter ( ) : System

construct a new blank writer (any writes will throw exceptions if you don't set a stream or a file!)

GenericSeparatedValueWriter ( string filename, char delims ) : System

construct a new writer to append to the given file

MakeColumnLine ( List columns ) : string

allows you to use any functional writable stream

generate the first column properly

MakeFormatLine ( List columns ) : string

generate the first column properly

SetTablename ( string tableName ) : void
SetWriteFile ( string filename ) : bool

specify an output file for APPENDing to, and sharing reading. (if you don't like it, send in your own filestream :)

WriteLine ( IEnumerable values ) : bool

Make sure you have a value for every column! This is really intentionally not thread safe, do not share this class across threads.

WriteLine ( string line ) : bool

메소드 상세

Close() 공개 메소드

closes the underlying stream
public Close ( ) : bool
리턴 bool

CreateTable() 공개 메소드

public CreateTable ( string tablename, IEnumerable columns ) : bool
tablename string
columns IEnumerable
리턴 bool

Flush() 공개 메소드

flushes the stream
public Flush ( ) : bool
리턴 bool

GenericSeparatedValueWriter() 공개 메소드

construct a new blank writer (any writes will throw exceptions if you don't set a stream or a file!)
public GenericSeparatedValueWriter ( ) : System
리턴 System

GenericSeparatedValueWriter() 공개 메소드

construct a new writer to append to the given file
public GenericSeparatedValueWriter ( string filename, char delims ) : System
filename string
delims char
리턴 System

MakeColumnLine() 공개 메소드

allows you to use any functional writable stream generate the first column properly
public MakeColumnLine ( List columns ) : string
columns List
리턴 string

MakeFormatLine() 공개 메소드

generate the first column properly
public MakeFormatLine ( List columns ) : string
columns List
리턴 string

SetTablename() 공개 메소드

public SetTablename ( string tableName ) : void
tableName string
리턴 void

SetWriteFile() 공개 메소드

specify an output file for APPENDing to, and sharing reading. (if you don't like it, send in your own filestream :)
public SetWriteFile ( string filename ) : bool
filename string
리턴 bool

WriteLine() 공개 메소드

Make sure you have a value for every column! This is really intentionally not thread safe, do not share this class across threads.
public WriteLine ( IEnumerable values ) : bool
values IEnumerable
리턴 bool

WriteLine() 공개 메소드

public WriteLine ( string line ) : bool
line string
리턴 bool

프로퍼티 상세

_filename 보호되어 있는 프로퍼티

an internal copy of our filename
protected string _filename
리턴 string

_line 보호되어 있는 프로퍼티

our buffer for constructing lines
protected StringBuilder _line
리턴 StringBuilder

_outputStream 보호되어 있는 프로퍼티

our wrapper around any provided stream
protected StreamWriter,System.IO _outputStream
리턴 System.IO.StreamWriter

_splitChars 보호되어 있는 프로퍼티

the tab, for the tab-separated part
protected char[] _splitChars
리턴 char[]