コード例 #1
0
        private void SynchronizeGroupCompletedEventHandler(object sender, SynchronizeCompletedEventArgs e)
        {
            Exception         exception         = (Exception)null;
            DeploymentManager deploymentManager = (DeploymentManager)null;

            try
            {
                deploymentManager = (DeploymentManager)sender;
                exception         = e.Error;
            }
            catch (Exception ex)
            {
                if (ExceptionUtility.IsHardException(ex))
                {
                    throw;
                }
                else
                {
                    exception = ex;
                }
            }
            finally
            {
                DownloadFileGroupCompletedEventArgs    e1 = new DownloadFileGroupCompletedEventArgs(e.Error, e.Cancelled, e.UserState, e.Group);
                DownloadFileGroupCompletedEventHandler completedEventHandler = (DownloadFileGroupCompletedEventHandler)this.Events[ApplicationDeployment.downloadFileGroupCompletedKey];
                if (completedEventHandler != null)
                {
                    completedEventHandler((object)this, e1);
                }
            }
        }
コード例 #2
0
 private void SynchronizeGroupCompletedEventHandler(object sender, SynchronizeCompletedEventArgs e)
 {
     try
     {
         DeploymentManager manager1 = (DeploymentManager)sender;
         Exception         error    = e.Error;
     }
     catch (Exception exception)
     {
         if (ExceptionUtility.IsHardException(exception))
         {
             throw;
         }
     }
     finally
     {
         DownloadFileGroupCompletedEventArgs    args    = new DownloadFileGroupCompletedEventArgs(e.Error, e.Cancelled, e.UserState, e.Group);
         DownloadFileGroupCompletedEventHandler handler = (DownloadFileGroupCompletedEventHandler)this.Events[downloadFileGroupCompletedKey];
         if (handler != null)
         {
             handler(this, args);
         }
     }
 }