Mono.Rocks.TextReaderRocks.CreateLineIterator C# (CSharp) Method

CreateLineIterator() private static method

private static CreateLineIterator ( TextReader self, TextReaderRocksOptions options ) : IEnumerable
self TextReader
options TextReaderRocksOptions
return IEnumerable
        private static IEnumerable<string> CreateLineIterator(TextReader self, TextReaderRocksOptions options)
        {
            try {
                string line;
                while ((line = self.ReadLine ()) != null)
                    yield return line;
            } finally {
                if ((options & TextReaderRocksOptions.CloseReader) != 0) {
                    self.Close ();
                    self.Dispose ();
                }
            }
        }