/// <summary>
/// Saves all sections. All data merged from other merged sources will
/// be included.
/// </summary>
public override void Save()
{
using (IsolatedStorageFile isolatedStorageFile = IsolatedStorageFile.GetStore(Scope, null, null))
{
using (var isoStream =
new IsolatedStorageFileStream(_fileName,
FileMode.Truncate,
FileAccess.Write,
FileShare.Read,
isolatedStorageFile))
{
string xml = XmlConfigurationSource.ToXml(Sections.Values);
byte[] xmlBytes = Encoding.UTF8.GetBytes(xml);
isoStream.Write(xmlBytes, 0, xmlBytes.Length);
isoStream.Flush();
}
}
}