예제 #1
0
        public IEnumerable Characters()
        {
            //returns an iterator for the characters in this file

            using (Parser parser = new Parser())
            {
                parser.Load(_fname);
                int count = parser.ReadHeader();

                for(int i = 0; i < count; i++)
                {
                    Character c = new Character();
                    foreach (Properties.IProperty p in parser)
                    {
                        c.AddProperty(p);
                    }
                    yield return c;
                }
            }
        }
예제 #2
0
 public void TestReadHeader()
 {
     using (Parser parser = new Parser())
     {
         parser.Load(@"c:\tmp\Empty.bin");
         int header = parser.ReadHeader();
         Assert.AreEqual(header, 0);
     }
 }