Exemple #1
0
        public void Save(MapId id, PSLM model)
        {
            string file = Path.Combine(MapFolderPath, id.ToInternalFileName());

            using (var bw = new BinaryWriter(File.Create(file)))
            {
                model.WriteTo(bw);
            }
        }
Exemple #2
0
        public PSLM Retrieve(MapId id)
        {
            string file = Path.Combine(MapFolderPath, id.ToInternalFileName());

            using (var br = new BinaryReader(File.OpenRead(file)))
            {
                return(new PSLM(br));
            }
        }