Example #1
0
        internal static void ReadSettings()
        {
            ConfigFileXml = ReadConfigFile();

            var provider = ConfigFileXml.Descendants(XmlElements.Provider).First();

            Password = provider.Attribute(XmlAttributes.Password)?.Value;

            User = provider.Attribute(XmlAttributes.User)?.Value;

            ApiUrl = provider.Attribute(XmlAttributes.Uri)?.Value;

            GeosynchronizationNamespace = provider.Attribute(XmlAttributes.GeosynchronizationNamespace)?.Value;

            ChangelogNamespace = provider.Attribute(XmlAttributes.ChangelogNamespace)?.Value;
        }
Example #2
0
        internal static void Save()
        {
            using (var stream = File.Open(ConfigFile, FileMode.Create)) ConfigFileXml.Save(stream);

            ConfigFileXml = ReadConfigFile();
        }