Exemplo n.º 1
0
        /// <summary>
        /// Downloads the AppInfo using the given Url, parses the file, and returns the AppInfo object
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public static AppInfo Get(string url)
        {
            // Create local path to download 'appinfo' file to
            string path = FileLocations.CreateTempPath();

            // Download File
            Logger.Log("Downloading AppInfo File...", LogLineType.Notification);
            if (Download(url, path))
            {
                // Parse File as AppInfo class
                var info = Parse(path);

                // Delete temp file
                if (File.Exists(path))
                {
                    File.Delete(path);
                }

                return(info);
            }
            else
            {
                return(null);
            }
        }