Exemple #1
0
        private TMap CreateMap <TMap>(MapStream reader, byte streamId = 0) where TMap : IMap, new()
        {
            var map = new TMap();

            BlamSerializer.DeserializeInto(map, reader.GetStream(streamId));
            map.Load(streamId, reader);
            return(map);
        }
Exemple #2
0
        private MapStream GetAggregateStream(Stream mapStream, MapStreamTransform streamTransform)
        {
            var stream = new MapStream(streamTransform(mapStream));

            foreach (var(key, map) in this.config.AncillaryMaps)
            {
                var fs = new ReadOnlyFileStream(Path.Combine(this.config.MapRoot, map));
                stream.UseAncillaryMap(key, streamTransform(fs));
            }

            return(stream);
        }