protected override bool ProcessInternal(PropertyBag propertyBag)
        {
            ADObjectId tenantOU   = ProcessorHelper.GetTenantOU(propertyBag);
            ADRawEntry properties = this.organizationPropertyLookup.GetProperties(tenantOU);

            if (!TenantRelocationProcessor.IsDeletedOrg(properties, tenantOU) && TenantRelocationProcessor.HasBeenInvolvedInRelocation(properties))
            {
                bool isSourceOfRelocation;
                TenantRelocationState tenantRelocationState = this.getTenantRelocationState(tenantOU, out isSourceOfRelocation, false);
                bool flag = tenantRelocationState.SourceForestState == TenantRelocationStatus.Retired;
                if (!flag || tenantRelocationState.SourceForestState == TenantRelocationStatus.Lockdown)
                {
                    tenantRelocationState = this.getTenantRelocationState(tenantOU, out isSourceOfRelocation, true);
                    flag = (tenantRelocationState.SourceForestState == TenantRelocationStatus.Retired);
                }
                return(this.HandleRelocationState(flag, isSourceOfRelocation, propertyBag, properties));
            }
            return(true);
        }
        private bool HandleRelocationState(bool isRelocationCompleted, bool isSourceOfRelocation, PropertyBag propertyBag, ADRawEntry org)
        {
            if (!isRelocationCompleted)
            {
                if (!isSourceOfRelocation)
                {
                    this.reporter.ReportExcludedObject(propertyBag, DirectoryObjectErrorCode.ObjectOutOfScope, ProcessingStage.RelocationStageFilter);
                }
                return(isSourceOfRelocation);
            }
            if (!isSourceOfRelocation)
            {
                if (this.isIncrementalSync)
                {
                    WatermarkMap vectorToFilterRelocationData = TenantRelocationProcessor.GetVectorToFilterRelocationData(org);
                    if (vectorToFilterRelocationData.ContainsKey(this.invocationId))
                    {
                        long num = vectorToFilterRelocationData[this.invocationId];
                        if ((long)(propertyBag[ADRecipientSchema.UsnChanged] ?? 9223372036854775807L) < num)
                        {
                            this.reporter.ReportExcludedObject(propertyBag, DirectoryObjectErrorCode.ObjectOutOfScope, ProcessingStage.RelocationPartOfRelocationSyncFilter);
                            return(false);
                        }
                    }
                }
                return(true);
            }
            if (ProcessorHelper.IsObjectOrganizationUnit(propertyBag))
            {
                this.reporter.ReportExcludedObject(propertyBag, DirectoryObjectErrorCode.ObjectOutOfScope, ProcessingStage.RelocationStageFilter);
                return(false);
            }
            ServiceInstanceId value = new ServiceInstanceId(string.Format("exchange/{0}", org[ExchangeConfigurationUnitSchema.TargetForest]));

            propertyBag.SetField(SyncObjectSchema.FaultInServiceInstance, value);
            return(true);
        }