Esempio n. 1
0
        ///<summary>Updates the XML file with the current Visual Studio settings.</summary>
        public bool SaveSettings()
        {
            using (var stream = File.Open(SettingsPath, FileMode.OpenOrCreate)) {
                var xml = XDocument.Load(stream, LoadOptions.PreserveWhitespace);

                if (!UpdateSettingsXml(xml))
                {
                    return(false);
                }

                dte.CheckOutFromSourceControl(SettingsPath);
                stream.SetLength(0);
                xml.Save(stream);
                logger.Log("Saved changed settings to " + SettingsPath);
                OnSettingsSaved();
                return(true);
            }
        }