public XmlLevel(string levelId, XmlGroup[] groups, string startTrackId, string endTrackId) { LevelId = levelId; StartTrackId = startTrackId; EndTrackId = endTrackId; Groups = groups; }
public Group MapXmlToDomain(XmlGroup xmlGroup, List<SplitAttachment> splitAttachments) { Group group = new Group(xmlGroup.Id); if(xmlGroup.SplitAttachment != null) splitAttachments.Add( new SplitAttachment(group, new Reference<Split>(xmlGroup.SplitAttachment.SplitId), xmlGroup.SplitAttachment.Lhs)); group.Splits.AddRange( xmlGroup.Splits.Select(xmlSplit => _splitMapper.MapXmlToDomain(xmlSplit, group))); group.SplittedRegions.AddRange(SplitRegions(group.Splits)); group.SplittedMeshBlocks.AddRange( _blockMapper.MaxXmlToDomain(xmlGroup.Blocks, group.Splits, group.SplittedRegions)); group.Tracks.AddRange( xmlGroup.Tracks.Select(xmlTrack => _trackMapper.MapXmlToDomain(xmlTrack, group.Splits, group.SplittedRegions))); group.Junctions.AddRange( xmlGroup.Junctions.Select(xmlJunction => _junctionMapper.MapXmlToDomain(xmlJunction, group.Tracks))); return group; }