예제 #1
0
 protected override void ValidateRequest(TransactionalRequestJob requestJob)
 {
     base.ValidateRequest(requestJob);
     base.ValidateRequestIsActive(requestJob);
     base.ValidateRequestProtectionStatus(requestJob);
     base.ValidateRequestIsRunnable(requestJob);
     base.ValidateRequestIsNotCancelled(requestJob);
     if (!requestJob.Suspend)
     {
         base.WriteVerbose(Strings.RequestNotSuspended(requestJob.Name));
     }
     if (RequestJobStateNode.RequestStateIs(requestJob.StatusDetail, RequestState.Completion) && !RequestJobStateNode.RequestStateIs(requestJob.StatusDetail, RequestState.IncrementalSync))
     {
         base.WriteError(new SuspendWhenReadyToCompleteCannotBeUsedDuringCompletionException(requestJob.Name), ErrorCategory.InvalidArgument, requestJob.Identity);
     }
     using (MailboxReplicationServiceClient mailboxReplicationServiceClient = requestJob.CreateMRSClient(base.ConfigSession, requestJob.WorkItemQueueMdb.ObjectGuid, base.UnreachableMrsServers))
     {
         LocalizedString message = requestJob.Message;
         requestJob.Message = LocalizedString.Empty;
         try
         {
             List <ReportEntry> entries = null;
             using (mailboxReplicationServiceClient.ValidateAndPopulateRequestJob(requestJob, out entries))
             {
                 RequestTaskHelper.WriteReportEntries(requestJob.Name, entries, requestJob.Identity, new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.TaskWarningLoggingDelegate(this.WriteWarning), new Task.TaskErrorLoggingDelegate(base.WriteError));
             }
         }
         finally
         {
             requestJob.Message = message;
         }
     }
 }