Exemplo n.º 1
0
        public override bool Verify()
        {
            bool flag = true;

            foreach (Database database in base.Databases)
            {
                ADObjectId[] serversToCompare;
                if (database.Servers != null && database.Servers.Length != 0)
                {
                    serversToCompare = database.Servers;
                }
                else
                {
                    serversToCompare = new ADObjectId[]
                    {
                        database.Server
                    };
                }
                if (string.Equals((null == database.LogFolderPath) ? string.Empty : database.LogFolderPath.PathName, this.logLocation, StringComparison.OrdinalIgnoreCase) && EdbFileLocationUniqueUnderDAGCondition.HasCommonServer(this.serversOfMyDBCopies, serversToCompare))
                {
                    flag = false;
                    break;
                }
            }
            TaskLogger.Trace("DbLogLocationUniqueUnderServerCondition.Verify() returns {0}: <Server '{1}', LogLocation '{2}'>", new object[]
            {
                flag,
                base.ServerId.ToString(),
                this.logLocation
            });
            return(flag);
        }
        public override bool Verify()
        {
            bool flag = true;

            foreach (Database database in base.Databases)
            {
                ADObjectId[] serversToCompare;
                if (database.Servers != null && database.Servers.Length != 0)
                {
                    serversToCompare = database.Servers;
                }
                else
                {
                    serversToCompare = new ADObjectId[]
                    {
                        database.Server
                    };
                }
                if (string.Equals((null == database.EdbFilePath) ? string.Empty : database.EdbFilePath.PathName, this.edbFileLocation, StringComparison.OrdinalIgnoreCase) && EdbFileLocationUniqueUnderDAGCondition.HasCommonServer(this.serversOfMyDBCopies, serversToCompare))
                {
                    TaskLogger.Trace("The specifed path '{0}' equals to the product Edb file location or copy Edb file location of database '{1}' and the database is in the same DAG", new object[]
                    {
                        this.edbFileLocation,
                        (ADObjectId)database.Identity
                    });
                    flag = false;
                    break;
                }
            }
            TaskLogger.Trace("EdbFileLocationUniqueUnderServerCondition.Verify() returns {0}: <Server '{1}', PathName '{2}'>", new object[]
            {
                flag,
                base.ServerId.ToString(),
                this.edbFileLocation
            });
            return(flag);
        }