Exemplo n.º 1
0
        // Token: 0x0600194F RID: 6479 RVA: 0x0006886C File Offset: 0x00066A6C
        protected override LocalizedString RunPrereqs(AutoReseedWorkflowState state)
        {
            LocalizedString result = base.RunPrereqs(state);

            if (!result.IsEmpty)
            {
                return(result);
            }
            result = FailedSuspendedCopyAutoReseedWorkflow.hookableCheckExVolumes.Value(base.Context);
            if (!result.IsEmpty)
            {
                return(result);
            }
            result = FailedSuspendedCopyAutoReseedWorkflow.CheckDatabaseLogPaths(base.Context);
            if (!result.IsEmpty)
            {
                return(result);
            }
            if (base.Context.TargetCopyStatus.CopyStatus.ActionInitiator == ActionInitiatorType.Administrator)
            {
                base.TraceError("RunPrereqs(): The DatabaseCopy has been suspended by an Administrator so AutoReseed will not be attempted.", new object[0]);
                return(ReplayStrings.AutoReseedFailedAdminSuspended);
            }
            if (base.Context.TargetCopyStatus.CopyStatus.ReseedBlocked)
            {
                string messageOrNoneString = AmExceptionHelper.GetMessageOrNoneString(base.Context.TargetCopyStatus.CopyStatus.ErrorMessage);
                base.TraceError("RunPrereqs(): The DatabaseCopy is marked as ReseedBlocked so AutoReseed will not be attempted. Database copy ErrorMessage: {0}", new object[]
                {
                    messageOrNoneString
                });
                return(ReplayStrings.AutoReseedFailedReseedBlocked(messageOrNoneString));
            }
            this.ResetWorkflowRecoveryActionIfNecessary(state);
            if (!state.IsLastReseedRecoveryActionPending())
            {
                base.TraceDebug("RunPrereqs(): Running the workflow for the first time, so starting with the Resume action. LastReseedRecoveryAction = {0}", new object[]
                {
                    state.LastReseedRecoveryAction
                });
                state.UpdateReseedRecoveryAction(ReseedState.Resume);
            }
            if (state.LastReseedRecoveryAction == ReseedState.Resume)
            {
                result = this.RunPrereqsForResume(state);
            }
            if (state.LastReseedRecoveryAction == ReseedState.AssignSpare)
            {
                result = this.RunPrereqsForAssignSpare(state);
            }
            if (state.LastReseedRecoveryAction == ReseedState.InPlaceReseed)
            {
                result = this.RunPrereqsForInPlaceReseed(state);
            }
            return(result);
        }
        protected override LocalizedString RunPrereqs(AutoReseedWorkflowState state)
        {
            LocalizedString result = base.RunPrereqs(state);

            if (!result.IsEmpty)
            {
                return(result);
            }
            result = FailedSuspendedCopyAutoReseedWorkflow.CheckExchangeVolumesPresent(base.Context);
            if (!result.IsEmpty)
            {
                return(result);
            }
            return(FailedSuspendedCopyAutoReseedWorkflow.CheckDatabaseLogPaths(base.Context));
        }