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; } } }
public void TestReadHeader() { using (Parser parser = new Parser()) { parser.Load(@"c:\tmp\Empty.bin"); int header = parser.ReadHeader(); Assert.AreEqual(header, 0); } }