public int Serialize( Map map, Stream stream, IMapConverterEx converter ) { BinaryWriter writer = new BinaryWriter( stream ); int count = 0; foreach ( World world in WorldManager.Worlds ) { converter.WriteMetadataEntry( _group[0], world.Name, world.Serialize(), writer ); ++count; } return count; }
public int Serialize(Map map, Stream stream, IMapConverterEx converter) { BinaryWriter writer = new BinaryWriter(stream); int count = 0; Zone[] zoneList = map.Zones.Cache; foreach (Zone zone in zoneList) { converter.WriteMetadataEntry(_group[0], zone.Name, SerializeZone(zone), writer); ++count; } return(count); }
public int Serialize( Map map, Stream stream, IMapConverterEx converter ) { BinaryWriter writer = new BinaryWriter( stream ); int count = 0; if ( map.MessageBlocks != null ) { if ( map.MessageBlocks.Count >= 1 ) { foreach ( MessageBlock MessageBlock in map.MessageBlocks ) { converter.WriteMetadataEntry( _group[0], MessageBlock.Name, MessageBlock.Serialize(), writer ); ++count; } } } return count; }
public int Serialize( Map map, Stream stream, IMapConverterEx converter ) { BinaryWriter writer = new BinaryWriter( stream ); int count = 0; if ( map.Doors != null ) { if ( map.Doors.Count >= 1 ) { foreach ( Door Door in map.Doors ) { converter.WriteMetadataEntry( _group[0], Door.Name, Door.Serialize(), writer ); ++count; } } } return count; }
public int Serialize(Map map, Stream stream, IMapConverterEx converter) { BinaryWriter writer = new BinaryWriter(stream); int count = 0; if (map.MessageBlocks != null) { if (map.MessageBlocks.Count >= 1) { foreach (MessageBlock MessageBlock in map.MessageBlocks) { converter.WriteMetadataEntry(_group[0], MessageBlock.Name, MessageBlock.Serialize(), writer); ++count; } } } return(count); }
public int Serialize(Map map, Stream stream, IMapConverterEx converter) { BinaryWriter writer = new BinaryWriter(stream); int count = 0; if (map.Portals != null) { if (map.Portals.Count >= 1) { foreach (Portal portal in map.Portals) { converter.WriteMetadataEntry(_group[0], portal.Name, portal.Serialize(), writer); ++count; } } } return(count); }
public int Serialize(Map map, Stream stream, IMapConverterEx converter) { BinaryWriter writer = new BinaryWriter(stream); int count = 0; World w = map.World; Object lockObj = null == w ? new object() : w.SyncRoot; IEnumerable <Life2DZone> lifes; lock ( lockObj ) { lifes = map.LifeZones.Values.ToList(); //copies the current life list under a lock } foreach (Life2DZone life in lifes) { converter.WriteMetadataEntry(_group[0], life.Name, life.Serialize(), writer); ++count; } return(count); }
public int Serialize(Map map, Stream stream, IMapConverterEx converter) { BinaryWriter writer = new BinaryWriter(stream); int count = 0; World w = map.World; Object lockObj = null == w ? new object() : w.SyncRoot; IEnumerable<Life2DZone> lifes; lock (lockObj) { lifes = map.LifeZones.Values.ToList(); //copies the current life list under a lock } foreach (Life2DZone life in lifes) { converter.WriteMetadataEntry(_group[0], life.Name, life.Serialize(), writer); ++count; } return count; }
public int Serialize( Map map, Stream stream, IMapConverterEx converter ) { BinaryWriter writer = new BinaryWriter( stream ); int count = 0; Zone[] zoneList = map.Zones.Cache; foreach ( Zone zone in zoneList ) { converter.WriteMetadataEntry( _group[0], zone.Name, SerializeZone( zone ), writer ); ++count; } return count; }