/// <summary>
		/// Reads the extension config file
		/// </summary>
		/// <param name="filename">Filename</param>
		/// <returns></returns>
		public static ExtensionConfig Read(string filename) {
			var config = new ExtensionConfig();
			if (!File.Exists(filename))
				return config;
			var doc = XDocument.Load(filename, LoadOptions.None);
			var root = doc.Root;
			if (root.Name == XML_ROOT_NAME)
				Read(root, config);
			return config;
		}
Example #2
0
        /// <summary>
        /// Reads the extension config file
        /// </summary>
        /// <param name="filename">Filename</param>
        /// <returns></returns>
        public static ExtensionConfig Read(string filename)
        {
            var config = new ExtensionConfig();

            if (!File.Exists(filename))
            {
                return(config);
            }
            var doc  = XDocument.Load(filename, LoadOptions.None);
            var root = doc.Root;

            if (root.Name == XML_ROOT_NAME)
            {
                Read(root, config);
            }
            return(config);
        }
Example #3
0
 static void Read(XElement root, ExtensionConfig config)
 {
     config.OSVersion        = ReadVersion(root, OS_VERSION_SECT);
     config.FrameworkVersion = ReadVersion(root, FRAMEWORK_VERSION_SECT);
     config.AppVersion       = ReadVersion(root, APP_VERSION_SECT);
 }
		static void Read(XElement root, ExtensionConfig config) {
			config.OSVersion = ReadVersion(root, OS_VERSION_SECT);
			config.FrameworkVersion = ReadVersion(root, FRAMEWORK_VERSION_SECT);
			config.AppVersion = ReadVersion(root, APP_VERSION_SECT);
		}