C# Class BlueCollar.Examples.Tail

Provides file tail-reading services.
Show file Open project: ChadBurggraf/blue-collar

Public Methods

Method Description
Read ( Stream stream, int count ) : IEnumerable

Reads the given stream, tailing the given number of lines, sing UTF-8 encoding.

Read ( Stream stream, int count, Encoding encoding ) : IEnumerable

Reads the given stream, tailing the given number of lines.

Read ( string path, int count ) : IEnumerable

Reads the given file, tailing the given number of lines, using UTF-8 encoding.

Read ( string path, int count, Encoding encoding ) : IEnumerable

Reads the given file, tailing the given number of lines.

Private Methods

Method Description
ReadBuffer ( IList output, StringBuilder outputValue, char buffer, int count ) : string

Reads a buffer of characters in reverse, appending each line to the given output list and writing the un-split output to the given output string.

Method Details

Read() public static method

Reads the given stream, tailing the given number of lines, sing UTF-8 encoding.
public static Read ( Stream stream, int count ) : IEnumerable
stream Stream The stream to read.
count int The maximum number of lines to tail.
return IEnumerable

Read() public static method

Reads the given stream, tailing the given number of lines.
public static Read ( Stream stream, int count, Encoding encoding ) : IEnumerable
stream Stream The stream to read.
count int The maximum number of lines to tail.
encoding System.Text.Encoding The encoding to use.
return IEnumerable

Read() public static method

Reads the given file, tailing the given number of lines, using UTF-8 encoding.
public static Read ( string path, int count ) : IEnumerable
path string The path of the file to read.
count int The maximum number of lines to tail.
return IEnumerable

Read() public static method

Reads the given file, tailing the given number of lines.
public static Read ( string path, int count, Encoding encoding ) : IEnumerable
path string The path of the file to read.
count int The maximum number of lines to tail.
encoding System.Text.Encoding The encoding to use.
return IEnumerable