コード例 #1
0
 protected override void InternalValidate()
 {
     TaskLogger.LogEnter();
     if (this.Identity != null)
     {
         this.Identity.AllowInvalid = true;
     }
     base.InternalValidate();
     if (base.HasErrors)
     {
         TaskLogger.LogExit();
         return;
     }
     this.ValidateDatabaseCopy();
     if (RemoteReplayConfiguration.IsServerRcrSource(ADObjectWrapperFactory.CreateWrapper(this.m_database), this.m_serverName, (ITopologyConfigurationSession)this.ConfigurationSession, out this.m_dbLocationInfo))
     {
         base.WriteError(new InvalidOperationException(Strings.ErrorDbMountedOnServer(this.m_database.Identity.ToString(), this.m_serverName)), ErrorCategory.InvalidOperation, this.m_database.Identity);
     }
     if (this.m_server != null)
     {
         base.VerifyIsWithinScopes((IConfigurationSession)base.DataSession, this.m_server, true, new DataAccessTask <DatabaseCopy> .ADObjectOutOfScopeString(Strings.ErrorServerOutOfScope));
     }
     if (this.m_database != null)
     {
         MapiTaskHelper.VerifyDatabaseIsWithinScope(base.SessionSettings, this.m_database, new Task.ErrorLoggerDelegate(base.WriteError));
         if (this.m_database.Servers != null && this.m_database.Servers.Length > 0)
         {
             MapiTaskHelper.VerifyServerIsWithinScope(this.m_database, new Task.ErrorLoggerDelegate(base.WriteError), (ITopologyConfigurationSession)this.ConfigurationSession);
         }
     }
     TaskLogger.LogExit();
 }
コード例 #2
0
        protected override void InternalValidate()
        {
            TaskLogger.LogEnter();
            base.InternalValidate();
            if (base.HasErrors)
            {
                TaskLogger.LogExit();
                return;
            }
            if (!this.ClearHostServer && this.m_dbCopy.HostServer != null)
            {
                base.VerifyIsWithinScopes((IConfigurationSession)base.DataSession, DatabaseTasksHelper.GetServerObject(new ServerIdParameter(this.m_dbCopy.HostServer), (IConfigurationSession)base.DataSession, this.RootId, new DataAccessHelper.GetDataObjectDelegate(base.GetDataObject <Server>)), true, new DataAccessTask <DatabaseCopy> .ADObjectOutOfScopeString(Strings.ErrorServerOutOfScope));
            }
            Database database = this.m_dbCopy.GetDatabase <Database>();

            if (database != null)
            {
                MapiTaskHelper.VerifyDatabaseIsWithinScope(base.SessionSettings, database, new Task.ErrorLoggerDelegate(base.WriteError));
                if (database.Servers != null && database.Servers.Length > 0)
                {
                    MapiTaskHelper.VerifyServerIsWithinScope(database, new Task.ErrorLoggerDelegate(base.WriteError), (ITopologyConfigurationSession)this.ConfigurationSession);
                }
            }
            if (this.DataObject.IsModified(DatabaseCopySchema.ReplayLag) && this.m_dbCopy.ReplayLagTime != TimeSpan.FromSeconds(0.0))
            {
                this.WriteWarning(Strings.WarningReplayLagTimeMustBeLessThanSafetyNetHoldTime);
            }
        }
コード例 #3
0
        protected override void InternalValidate()
        {
            if (this.Identity != null)
            {
                this.Identity.AllowInvalid = true;
            }
            base.InternalValidate();
            MapiTaskHelper.VerifyDatabaseIsWithinScope(base.SessionSettings, base.DataObject, new Task.ErrorLoggerDelegate(base.WriteError));
            TDataObject dataObject = base.DataObject;

            if (dataObject.Servers != null)
            {
                TDataObject dataObject2 = base.DataObject;
                if (dataObject2.Servers.Length > 0)
                {
                    MapiTaskHelper.VerifyServerIsWithinScope(base.DataObject, new Task.ErrorLoggerDelegate(base.WriteError), (ITopologyConfigurationSession)this.ConfigurationSession);
                }
            }
            TDataObject dataObject3 = base.DataObject;

            if (dataObject3.IsExchange2009OrLater)
            {
                TDataObject dataObject4 = base.DataObject;
                this.copies = dataObject4.AllDatabaseCopies;
                if (this.copies != null && this.copies.Length > 1)
                {
                    TDataObject   dataObject5 = base.DataObject;
                    Exception     exception   = new InvalidOperationException(Strings.ErrorMultipleDatabaseCopies(dataObject5.Identity.ToString()));
                    ErrorCategory category    = ErrorCategory.InvalidOperation;
                    TDataObject   dataObject6 = base.DataObject;
                    base.WriteError(exception, category, dataObject6.Identity);
                }
            }
        }
コード例 #4
0
        protected override void InternalValidate()
        {
            TaskLogger.LogEnter();
            base.InternalValidate();
            MapiTaskHelper.VerifyDatabaseIsWithinScope(base.SessionSettings, this.DataObject, new Task.ErrorLoggerDelegate(base.WriteError));
            TDataObject dataObject = this.DataObject;

            if (dataObject.Servers != null)
            {
                TDataObject dataObject2 = this.DataObject;
                if (dataObject2.Servers.Length > 0)
                {
                    MapiTaskHelper.VerifyServerIsWithinScope(this.DataObject, new Task.ErrorLoggerDelegate(base.WriteError), (ITopologyConfigurationSession)this.ConfigurationSession);
                }
            }
            ADPropertyDefinition[] deprecatedProperties = this.GetDeprecatedProperties();
            for (int i = 0; i < deprecatedProperties.Length; i++)
            {
                TDataObject dataObject3 = this.DataObject;
                if (dataObject3.IsModified(deprecatedProperties[i]))
                {
                    this.WriteWarning(Strings.WarnAboutDeprecatedParameter(deprecatedProperties[i].Name));
                }
            }
            TDataObject dataObject4 = this.DataObject;

            if (dataObject4.IsChanged(DatabaseSchema.DataMoveReplicationConstraintDefinition))
            {
                TDataObject dataObject5 = this.DataObject;
                DataMoveReplicationConstraintParameter dataMoveReplicationConstraint = dataObject5.DataMoveReplicationConstraint;
                ITopologyConfigurationSession          taskSession = (ITopologyConfigurationSession)base.DataSession;
                Database    database    = this.DataObject;
                TDataObject dataObject6 = this.DataObject;
                DatabaseTasksHelper.DataMoveReplicationConstraintFallBack(taskSession, database, dataObject6.DataMoveReplicationConstraint, out dataMoveReplicationConstraint);
                DataMoveReplicationConstraintParameter dataMoveReplicationConstraintParameter = dataMoveReplicationConstraint;
                TDataObject dataObject7 = this.DataObject;
                if (dataMoveReplicationConstraintParameter != dataObject7.DataMoveReplicationConstraint)
                {
                    TDataObject dataObject8 = this.DataObject;
                    DataMoveReplicationConstraintParameter dataMoveReplicationConstraint2 = dataObject8.DataMoveReplicationConstraint;
                    TDataObject dataObject9 = this.DataObject;
                    base.WriteError(new ConstraintErrorException(dataMoveReplicationConstraint2, dataObject9.Identity.ToString()), ErrorCategory.InvalidOperation, this.Identity);
                }
            }
            TDataObject dataObject10 = this.DataObject;

            if (dataObject10.IsChanged(DatabaseSchema.CircularLoggingEnabled))
            {
                TDataObject    dataObject11   = this.DataObject;
                DatabaseCopy[] databaseCopies = dataObject11.GetDatabaseCopies();
                if (databaseCopies != null && databaseCopies.Length == 1)
                {
                    TDataObject dataObject12 = this.DataObject;
                    this.WriteWarning(Strings.WarningOperationOnDBWithJetCircularLogging(dataObject12.Identity.ToString()));
                }
            }
            TaskLogger.LogExit();
        }