Exemplo n.º 1
0
        //**************************************************************
        // 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();
        }
Exemplo n.º 2
0
        //**************************************************************
        // 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();
        }