Beispiel #1
0
        internal static QueryFilter MountAtStartupFilterBuilder(SinglePropertyFilter filter)
        {
            LegacyDatabase.InternalAssertComparisonFilter(filter, LegacyDatabaseSchema.MountAtStartup);
            ComparisonFilter comparisonFilter = filter as ComparisonFilter;

            return(new ComparisonFilter(comparisonFilter.ComparisonOperator, LegacyDatabaseSchema.EdbOfflineAtStartup, !(bool)comparisonFilter.PropertyValue));
        }
Beispiel #2
0
        internal static QueryFilter RetainDeletedItemsUntilBackupFilterBuilder(SinglePropertyFilter filter)
        {
            LegacyDatabase.InternalAssertComparisonFilter(filter, LegacyDatabaseSchema.RetainDeletedItemsUntilBackup);
            ComparisonFilter comparisonFilter = filter as ComparisonFilter;

            return(new ComparisonFilter(comparisonFilter.ComparisonOperator, LegacyDatabaseSchema.DelItemAfterBackupEnum, ((bool)comparisonFilter.PropertyValue) ? Microsoft.Exchange.Data.Directory.Recipient.DeletedItemRetention.RetainUntilBackupOrCustomPeriod : Microsoft.Exchange.Data.Directory.Recipient.DeletedItemRetention.RetainForCustomPeriod));
        }
Beispiel #3
0
        internal static QueryFilter HasLocalCopyFilterBuilder(SinglePropertyFilter filter)
        {
            LegacyDatabase.InternalAssertComparisonFilter(filter, LegacyDatabaseSchema.HasLocalCopy);
            ComparisonFilter   comparisonFilter   = filter as ComparisonFilter;
            ComparisonOperator comparisonOperator = comparisonFilter.ComparisonOperator;

            if (comparisonOperator != ComparisonOperator.Equal && ComparisonOperator.NotEqual != comparisonOperator)
            {
                throw new ADFilterException(DirectoryStrings.ExceptionInvalidBitwiseComparison(LegacyDatabaseSchema.HasLocalCopy.Name, comparisonOperator.ToString()));
            }
            bool        flag        = (bool)comparisonFilter.PropertyValue;
            bool        flag2       = ComparisonOperator.Equal == comparisonOperator;
            QueryFilter queryFilter = new BitMaskAndFilter(LegacyDatabaseSchema.HasLocalCopyValue, 1UL);

            if (flag ^ flag2)
            {
                queryFilter = new NotFilter(queryFilter);
            }
            return(queryFilter);
        }