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(); }
public static void UpdateDataGuaranteeConstraint(ITopologyConfigurationSession taskSession, Database database, Task.TaskWarningLoggingDelegate writeWarning) { DataMoveReplicationConstraintParameter dataMoveReplicationConstraint = database.DataMoveReplicationConstraint; DatabaseTasksHelper.DataMoveReplicationConstraintFallBack(taskSession, database, database.DataMoveReplicationConstraint, out dataMoveReplicationConstraint); if (dataMoveReplicationConstraint != database.DataMoveReplicationConstraint) { writeWarning(Strings.ConstraintFallback(database.DataMoveReplicationConstraint, dataMoveReplicationConstraint, database.Identity.ToString())); } database.DataMoveReplicationConstraint = dataMoveReplicationConstraint; taskSession.Save(database); }