diff --git a/AutoUpdater.NET/AutoUpdater.cs b/AutoUpdater.NET/AutoUpdater.cs index 173834f8..8b451122 100644 --- a/AutoUpdater.NET/AutoUpdater.cs +++ b/AutoUpdater.NET/AutoUpdater.cs @@ -362,13 +362,13 @@ private static void BackgroundWorkerDoWork(object sender, DoWorkEventArgs e) XmlNode appArgs = item.SelectSingleNode("args"); - args.InstallerArgs = appArgs?.InnerText ?? String.Empty; + args.InstallerArgs = appArgs?.InnerText; XmlNode checksum = item.SelectSingleNode("checksum"); - args.HashingAlgorithm = checksum?.Attributes["algorithm"]?.InnerText ?? "MD5"; + args.HashingAlgorithm = checksum?.Attributes["algorithm"]?.InnerText; - args.Checksum = checksum?.InnerText ?? String.Empty; + args.Checksum = checksum?.InnerText; } } } @@ -402,9 +402,9 @@ private static void BackgroundWorkerDoWork(object sender, DoWorkEventArgs e) ChangelogURL = args.ChangelogURL = GetURL(webResponse.ResponseUri, args.ChangelogURL); DownloadURL = args.DownloadURL = GetURL(webResponse.ResponseUri, args.DownloadURL); Mandatory = args.Mandatory; - InstallerArgs = args.InstallerArgs; - HashingAlgorithm = args.HashingAlgorithm; - Checksum = args.Checksum; + InstallerArgs = args.InstallerArgs ?? String.Empty; + HashingAlgorithm = args.HashingAlgorithm ?? "MD5"; + Checksum = args.Checksum ?? String.Empty; webResponse.Close(); diff --git a/AutoUpdaterTest/FormMain.cs b/AutoUpdaterTest/FormMain.cs index 0ea30630..4484b935 100644 --- a/AutoUpdaterTest/FormMain.cs +++ b/AutoUpdaterTest/FormMain.cs @@ -23,9 +23,10 @@ public FormMain() private void FormMain_Load(object sender, EventArgs e) { - //Uncomment below line to handle parsing logic of non XML AppCast file. + //Uncomment below lines to handle parsing logic of non XML AppCast file. //AutoUpdater.ParseUpdateInfoEvent += AutoUpdaterOnParseUpdateInfoEvent; + //AutoUpdater.Start("http://rbsoft.org/updates/AutoUpdaterTest.json"); //Uncomment below line to run update process using non administrator account.