Ejemplo n.º 1
0
        internal LineReader OpenLineReader(string name, TextReaderOptions options = 0)
        {
            Stream s = _fileLoader.OpenFile(name);

            if (s != null)
            {
                return(new LineReader(s, options));
            }
            Error("Unable to find file '{0}'", name);
            return(null);
        }
Ejemplo n.º 2
0
 public LineReader(Stream stream, TextReaderOptions options)
 {
     _stream  = stream;
     _buffer  = new byte[LineSize];
     _options = options;
 }
Ejemplo n.º 3
0
 public static IEnumerable <int> GetLines(Stream str, List <string> segs, TextReaderOptions options)
 {
     using (LineReader r = new LineReader(str, options)) {
         return(r.GetLines(segs, 1));
     }
 }