internal void DeserializeLayerData(MgBinaryDeserializer d) { int groupCount = d.ReadInt32(); this.Groups.Clear(); for (int i = 0; i < groupCount; i++) { //TODO: Review when we split to specific implementations RuntimeMapGroup g = new RuntimeMapGroup(); g.Deserialize(d); this.Groups.Add(g); } int mapLayerCount = d.ReadInt32(); this.Layers.Clear(); while (mapLayerCount-- > 0) { RuntimeMapLayer t = DeserializeLayer(d); this.Layers.Add(t); } }