Example #1
0
        private static void SaveConfigToFile(string filePath, IMetadataService metadataService)
        {
            string fileName = metadataService.GetConfigurationFileName();

            byte[] fileData = metadataService.ReadBytes(fileName);
            using (StreamReader reader = metadataService.CreateReader(fileData))
                using (StreamWriter writer = new StreamWriter(filePath, false, Encoding.UTF8))
                {
                    writer.Write(reader.ReadToEnd());
                }
        }