public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex) { switch (propIndex) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: base.Parse(propIndex, value, nestedIndex); return; case 12: _roomTag = value.StringVal; return; case 13: _usableHeight = value.RealVal; return; case 14: _grossArea = value.RealVal; return; case 15: _netArea = value.RealVal; return; case 16: _floor = (CobieFloor)(value.EntityVal); return; default: throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper())); } }
private void CompareTrees(CobieFloor floorLeft, CobieFloor floorRight) { Assert.AreEqual(floorLeft.ExternalId, floorRight.ExternalId); Assert.AreEqual(floorLeft.AltExternalId, floorRight.AltExternalId); Assert.AreEqual(floorLeft.Name, floorRight.Name); Assert.AreEqual(floorLeft.Spaces.Count(), floorRight.Spaces.Count(), "Space count mismatch"); if (floorLeft.Spaces.Count() == floorRight.Spaces.Count()) { for (int i = 0; i < floorLeft.Spaces.Count(); ++i) { var spaceLeft = floorLeft.Spaces.ElementAt(i); var spaceRight = floorLeft.Spaces.ElementAt(i); CompareTrees(spaceLeft, spaceRight); } } }