ClickOnceManifest LoadManifest(XElement applicationManifestXml, Uri absoluteCodebase)
        {
            ClickOnceManifest manifest = ManifestParser.DownloadAndParseManifest(absoluteCodebase);

            manifest.Version   = ParseVersion(applicationManifestXml);
            manifest.LocalPath = GetVersionPath(manifest.Version);
            return(manifest);
        }
        public void Download()
        {
            var applicationManifestXml = XElement.Load(ApplicationUrl);
            var absoluteCodebase       =
                new Uri(ManifestParser.GetUriWithoutFile(ApplicationUrl),
                        ParseCodebase(applicationManifestXml));

            ApplicationManifest = LoadManifest(applicationManifestXml, absoluteCodebase);
            DownloadFiles(ApplicationManifest);
        }