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); } }
public PSLM Retrieve(MapId id) { string file = Path.Combine(MapFolderPath, id.ToInternalFileName()); using (var br = new BinaryReader(File.OpenRead(file))) { return(new PSLM(br)); } }