//************************************************************** // Validate() //************************************************************** private void Validate() { if (!ValidateAssemblies) { return; } //Initialize the Keys Object Keys = new AppKeys(AppMan.Manifest.State.DownloadSource); Keys.InitializeKeyCheck(); try { ValidateDirectory(AppMan.Manifest.State.DownloadDestination); } catch (Exception) { Keys.UnInitializeKeyCheck(); //Remove the downloaded files if any error occurs in validation. HardDirectoryDelete(AppMan.Manifest.State.DownloadDestination); //Set the update failure count to max. //Don't retry the update another time. This will cause the update //to reset. AppMan.Manifest.State.UpdateFailureCount = UpdateRetryAttempts; AppMan.Manifest.Update(); throw; } Keys.UnInitializeKeyCheck(); }
//************************************************************** // Validate() //************************************************************** private void Validate() { if (!ValidateAssemblies) return; //Initialize the Keys Object Keys = new AppKeys(AppMan.Manifest.State.DownloadSource); Keys.InitializeKeyCheck(); try { ValidateDirectory(AppMan.Manifest.State.DownloadDestination); } catch (Exception) { Keys.UnInitializeKeyCheck(); //Remove the downloaded files if any error occurs in validation. HardDirectoryDelete(AppMan.Manifest.State.DownloadDestination); //Set the update failure count to max. //Don't retry the update another time. This will cause the update //to reset. AppMan.Manifest.State.UpdateFailureCount = UpdateRetryAttempts; AppMan.Manifest.Update(); throw; } Keys.UnInitializeKeyCheck(); }