public void SaveSettings() { using (var stream = integrationDirectory.CreateFile(SettingsFileName)) { settingsSerializer.Serialize(stream, boxSettings); } }
// I/F public void Save(string name, Block block, Description description) { EnsureDirectory(); var blockFileName = Block.ResolveFileName(name); var descriptionFileName = Description.ResolveFileName(name); using (var stream = directory.CreateFile(blockFileName)) { blockSerializer.Serialize(stream, block); } using (var stream = directory.CreateFile(descriptionFileName)) { descriptionSerializer.Serialize(stream, description); } }