public Fragment(FileStrBuff file) { m_Collections = new KeywordCollection[3]; while (!file.Eof()) { string tok = file.GetNextToken().ToLower(); if (tok == null || tok.Length <= 0) continue; if (tok == "#sophistication") { Sophistication s; string level = file.GetNextToken(); try { s = (Sophistication)Enum.Parse(typeof(Sophistication), level, true); } catch { //Console.WriteLine( "Fragment : Error, invalid Sophistication {0}", level ); continue; } m_Collections[(int)s] = new KeywordCollection(file); } else if (tok == "#fragment") { while (!file.Eof()) { if (file.GetNextToken() == "{") break; } } else if (tok != "{" && tok != "}") { //Console.WriteLine( "Fragment : Unknown token '{0}'", tok ); } } }