C# 클래스 Malevich.StreamCombiner

Implements a TextReader-like class that (only two methods though: ReadLine and Close) that wraps around either a TextReader, or a bunch of diffs.
상속: IDisposable
파일 보기 프로젝트 열기: daptiv/Malevich 1 사용 예제들

공개 메소드들

메소드 설명
Close ( ) : void

Frees all the resources.

ReadLine ( ) : string

Read one line of input.

ReadLines ( ) : IEnumerable

Used to enumerate every line in the stream until EOF.

StreamCombiner ( TextReader baseReader ) : System

The wrapper case - just wraps a TextReader. Will Close it on Close. Nothing intelligent.

StreamCombiner ( string baseText ) : System

The wrapper case - just wraps a string.

StreamCombiner ( string baseText, string diffText ) : System

Constructor for file and a diff case. This is where the meat of this class is used.

비공개 메소드들

메소드 설명
IDisposable ( ) : void

Closes the stream.

ParseDiffLine ( string text ) : int

Parses a line from the diff file which specifies the next line where the next diff section starts.

메소드 상세

Close() 공개 메소드

Frees all the resources.
public Close ( ) : void
리턴 void

ReadLine() 공개 메소드

Read one line of input.
public ReadLine ( ) : string
리턴 string

ReadLines() 공개 메소드

Used to enumerate every line in the stream until EOF.
public ReadLines ( ) : IEnumerable
리턴 IEnumerable

StreamCombiner() 공개 메소드

The wrapper case - just wraps a TextReader. Will Close it on Close. Nothing intelligent.
public StreamCombiner ( TextReader baseReader ) : System
baseReader TextReader TextReader to wrap.
리턴 System

StreamCombiner() 공개 메소드

The wrapper case - just wraps a string.
public StreamCombiner ( string baseText ) : System
baseText string The string to wrap.
리턴 System

StreamCombiner() 공개 메소드

Constructor for file and a diff case. This is where the meat of this class is used.
public StreamCombiner ( string baseText, string diffText ) : System
baseText string The base of the file.
diffText string The diff.
리턴 System