예제 #1
0
파일: Parser.cs 프로젝트: waqashaneef/NosDB
        /// Opens the file with the specified name for parsing.
        public void OpenStream(TextReader stream)
        {
            Reset();

            m_source = new LookAheadReader(stream);

            PrepareToParse();
        }
예제 #2
0
파일: Parser.cs 프로젝트: waqashaneef/NosDB
        /// Opens the file with the specified name for parsing.
        public void OpenFile(String p_filename)
        {
            Reset();

            m_source = new LookAheadReader(
                new StreamReader(new FileStream(p_filename, FileMode.Open)));

            PrepareToParse();
        }
예제 #3
0
파일: Parser.cs 프로젝트: waqashaneef/NosDB
        /// Closes the file opened with <c>OpenFile</c>.
        public void CloseFile()
        {
            // This will automaticly close the FileStream (I think :))
            if (m_source != null)
            {
                m_source.Close();
            }

            m_source = null;
        }