예제 #1
0
 public void SaveSettings()
 {
     using (var stream = integrationDirectory.CreateFile(SettingsFileName))
     {
         settingsSerializer.Serialize(stream, boxSettings);
     }
 }
예제 #2
0
        // 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);
            }
        }