Exemple #1
0
        internal void SetProperties(ADObject server)
        {
            ADPropertyBag adpropertyBag = new ADPropertyBag();

            adpropertyBag.SetIsReadOnly(false);
            foreach (PropertyDefinition propertyDefinition in this.Schema.AllProperties)
            {
                ADPropertyDefinition key = (ADPropertyDefinition)propertyDefinition;
                object value             = server.propertyBag.Contains(key) ? server.propertyBag[key] : null;
                adpropertyBag.SetField(key, value);
            }
            MultiValuedProperty <string> multiValuedProperty = adpropertyBag[ADObjectSchema.ObjectClass] as MultiValuedProperty <string>;

            if (multiValuedProperty == null || multiValuedProperty.Count == 0)
            {
                multiValuedProperty = new MultiValuedProperty <string>(this.MostDerivedObjectClass);
                adpropertyBag.SetField(ADObjectSchema.ObjectClass, multiValuedProperty);
            }
            if (adpropertyBag[ADObjectSchema.WhenChangedUTC] == null)
            {
                DateTime utcNow = DateTime.UtcNow;
                adpropertyBag.SetField(ADObjectSchema.WhenChangedUTC, utcNow);
                adpropertyBag.SetField(ADObjectSchema.WhenCreatedUTC, utcNow);
            }
            adpropertyBag.SetIsReadOnly(true);
            this.propertyBag = adpropertyBag;
        }
Exemple #2
0
        // Token: 0x06000E78 RID: 3704 RVA: 0x00045564 File Offset: 0x00043764
        private static ADRawEntry ADRawEntryFromPropValues(ADObjectId id, bool createReadOnly, PropValue[] propValues, IEnumerable <MbxPropertyDefinition> properties, List <ValidationError> errors)
        {
            string        fqdn          = LocalServerCache.LocalServer.Fqdn;
            ADPropertyBag adpropertyBag = new ADPropertyBag(createReadOnly, 16);

            adpropertyBag.SetField(ADObjectSchema.Id, id);
            foreach (PropValue propValue in propValues)
            {
                if (!propValue.IsError())
                {
                    MbxPropertyDefinition   mbxPropertyDefinition   = ObjectSchema.GetInstance <MbxRecipientSchema>().FindPropertyDefinitionByPropTag(propValue.PropTag);
                    PropertyValidationError propertyValidationError = mbxPropertyDefinition.ValidateValue(propValue.Value, true);
                    if (propertyValidationError != null)
                    {
                        errors.Add(propertyValidationError);
                    }
                    adpropertyBag.SetField(mbxPropertyDefinition, SimpleStoreValueConverter.ConvertValueFromStore(mbxPropertyDefinition, propValue.Value));
                }
            }
            MbxRecipientSession.PopulateCustomizedCalculatedProperties(adpropertyBag, properties);
            ADRawEntry adrawEntry = new ADRawEntry(adpropertyBag);

            adrawEntry.OriginatingServer = fqdn;
            adrawEntry.WhenReadUTC       = new DateTime?(DateTime.UtcNow);
            adrawEntry.ResetChangeTracking(true);
            return(adrawEntry);
        }
Exemple #3
0
        public static ADRawEntry CreateFrom(SimpleADObject simpleADObject, IEnumerable <PropertyDefinition> properties)
        {
            ArgumentValidator.ThrowIfNull("simpleADObject", simpleADObject);
            ArgumentValidator.ThrowIfNull("properties", properties);
            ADPropertyBag adpropertyBag = new ADPropertyBag();

            SimpleADObject.SimpleList <SimpleADObject.SimpleADProperty> properties2 = simpleADObject.Properties;
            SimpleADObject.SimpleADProperty simpleADProperty;
            if (!properties2.TryGetValue(ADObjectSchema.Id.LdapDisplayName, out simpleADProperty))
            {
                throw new InvalidOperationException("dn is missing");
            }
            ValidationError validationError;
            ADObjectId      value = (ADObjectId)ADValueConvertor.ConvertFromADAndValidateSingleValue(simpleADProperty.Value as string, ADObjectSchema.Id, false, out validationError);

            adpropertyBag.SetField(ADObjectSchema.Id, value);
            foreach (PropertyDefinition propertyDefinition in properties)
            {
                ADPropertyDefinition propertyDefinition2 = (ADPropertyDefinition)propertyDefinition;
                SimpleADObject.AddPropertyToPropertyBag(propertyDefinition2, adpropertyBag, properties2);
            }
            adpropertyBag.SetField(ADObjectSchema.ObjectState, simpleADObject.ObjectState);
            adpropertyBag.SetObjectVersion(simpleADObject.ExchangeVersion);
            return(new ADRawEntry(adpropertyBag)
            {
                OriginatingServer = simpleADObject.OriginatingServer,
                WhenReadUTC = new DateTime?(simpleADObject.WhenReadUTC),
                DirectoryBackendType = simpleADObject.DirectoryBackendType,
                IsCached = true
            });
        }
Exemple #4
0
        internal static MiniVirtualDirectory CreateFrom(ADObject virtualDirectory, ICollection <PropertyDefinition> propertyDefinitions, object[] propertyValues)
        {
            MiniVirtualDirectory             miniVirtualDirectory = new MiniVirtualDirectory();
            IEnumerable <PropertyDefinition> allProperties        = miniVirtualDirectory.Schema.AllProperties;
            ADPropertyBag adpropertyBag = new ADPropertyBag();

            adpropertyBag.SetIsReadOnly(false);
            foreach (PropertyDefinition propertyDefinition in allProperties)
            {
                ADPropertyDefinition key = (ADPropertyDefinition)propertyDefinition;
                object value             = virtualDirectory.propertyBag.Contains(key) ? virtualDirectory.propertyBag[key] : null;
                adpropertyBag.SetField(key, value);
            }
            MultiValuedProperty <string> multiValuedProperty = adpropertyBag[ADObjectSchema.ObjectClass] as MultiValuedProperty <string>;

            if (multiValuedProperty == null || multiValuedProperty.Count == 0)
            {
                multiValuedProperty = new MultiValuedProperty <string>(virtualDirectory.MostDerivedObjectClass);
                adpropertyBag.SetField(ADObjectSchema.ObjectClass, multiValuedProperty);
            }
            if (adpropertyBag[ADObjectSchema.WhenChangedUTC] == null)
            {
                DateTime utcNow = DateTime.UtcNow;
                adpropertyBag.SetField(ADObjectSchema.WhenChangedUTC, utcNow);
                adpropertyBag.SetField(ADObjectSchema.WhenCreatedUTC, utcNow);
            }
            if (propertyDefinitions != null && propertyValues != null)
            {
                adpropertyBag.SetProperties(propertyDefinitions, propertyValues);
            }
            adpropertyBag.SetIsReadOnly(true);
            miniVirtualDirectory.propertyBag = adpropertyBag;
            return(miniVirtualDirectory);
        }
 public static void PerformMservModification(ADPropertyBag mservPropertyBag)
 {
     using (MservRecipientSession mservRecipientSession = new MservRecipientSession(false))
     {
         ADRawEntry instanceToSave = new ADRawEntry(mservPropertyBag);
         mservRecipientSession.Save(instanceToSave);
     }
 }
Exemple #6
0
        internal override ADSessionSettings FromExternalDirectoryOrganizationId(Guid externalDirectoryOrganizationId)
        {
            ADObjectId    adobjectId    = new ADObjectId(DalHelper.GetTenantDistinguishedName(externalDirectoryOrganizationId.ToString()), externalDirectoryOrganizationId);
            ADPropertyBag adpropertyBag = new ADPropertyBag();

            adpropertyBag[ADObjectSchema.ConfigurationUnit]      = adobjectId;
            adpropertyBag[ADObjectSchema.OrganizationalUnitRoot] = adobjectId;
            OrganizationId organizationId = (OrganizationId)ADObject.OrganizationIdGetter(adpropertyBag);

            return(ADSessionSettings.SessionSettingsFactory.CreateADSessionSettings(ScopeSet.GetOrgWideDefaultScopeSet(organizationId), adobjectId, organizationId, null, ConfigScopes.TenantLocal, PartitionId.LocalForest));
        }
Exemple #7
0
 // Token: 0x06000E79 RID: 3705 RVA: 0x00045650 File Offset: 0x00043850
 private static void PopulateCustomizedCalculatedProperties(ADPropertyBag propertyBag, IEnumerable <PropertyDefinition> propertiesToPopulate)
 {
     foreach (PropertyDefinition propertyDefinition in propertiesToPopulate)
     {
         ProviderPropertyDefinition providerPropertyDefinition = (ProviderPropertyDefinition)propertyDefinition;
         if (providerPropertyDefinition.IsCalculated)
         {
             ReadOnlyCollection <ProviderPropertyDefinition> supportingProperties = providerPropertyDefinition.SupportingProperties;
             if (supportingProperties.SingleOrDefault((ProviderPropertyDefinition supportingProperty) => !propertyBag.Contains(supportingProperty)) == null)
             {
                 object obj = propertyBag[providerPropertyDefinition];
             }
         }
     }
 }
Exemple #8
0
        // Token: 0x06000E76 RID: 3702 RVA: 0x000453A8 File Offset: 0x000435A8
        private static PropValue[] PropValuesFromADPropertyBag(ADPropertyBag properties)
        {
            List <PropValue> list = new List <PropValue>();

            foreach (object obj in properties.Keys)
            {
                SimpleProviderPropertyDefinition simpleProviderPropertyDefinition = (SimpleProviderPropertyDefinition)obj;
                MbxPropertyDefinition            mbxPropertyDefinition            = simpleProviderPropertyDefinition as MbxPropertyDefinition;
                if (properties.IsChanged(simpleProviderPropertyDefinition) && mbxPropertyDefinition != null && mbxPropertyDefinition.PropTag != PropTag.Null)
                {
                    object value = SimpleStoreValueConverter.ConvertValueToStore(properties[mbxPropertyDefinition]);
                    list.Add(new PropValue(mbxPropertyDefinition.PropTag, value));
                }
            }
            return(list.ToArray());
        }
 public static void PerformMbxModification(Guid mdbGuid, Guid mbxGuid, ADPropertyBag properties, bool isNew)
 {
     if (isNew)
     {
         MbxRecipientSession.CreateUserInformationRecord(mdbGuid, mbxGuid, properties);
         return;
     }
     try
     {
         MbxRecipientSession.UpdateUserInformationRecord(mdbGuid, mbxGuid, properties, null);
     }
     catch (ADDriverStoreAccessPermanentException ex)
     {
         if (ex.InnerException == null || !(ex.InnerException is MapiExceptionUserInformationNotFound))
         {
             throw;
         }
         MbxRecipientSession.CreateUserInformationRecord(mdbGuid, mbxGuid, properties);
     }
 }
Exemple #10
0
 // Token: 0x06000E7B RID: 3707 RVA: 0x0004576C File Offset: 0x0004396C
 public static void UpdateUserInformationRecord(Guid mdbGuid, Guid mbxGuid, ADPropertyBag propertiesToUpdate, IEnumerable <MbxPropertyDefinition> propertiesToRemove)
 {
     PropValue[] properties    = MbxRecipientSession.PropValuesFromADPropertyBag(propertiesToUpdate);
     PropTag[]   deletePropTag = MbxRecipientSession.PropTagsFromProperties(propertiesToRemove);
     try
     {
         using (ExRpcAdmin exRpcAdminInstance = MbxRecipientSession.GetExRpcAdminInstance())
         {
             exRpcAdminInstance.UpdateUserInfo(mdbGuid, mbxGuid, 0U, properties, deletePropTag);
         }
     }
     catch (MapiPermanentException innerException)
     {
         throw new ADDriverStoreAccessPermanentException(innerException);
     }
     catch (MapiRetryableException innerException2)
     {
         throw new ADDriverStoreAccessTransientException(innerException2);
     }
 }
Exemple #11
0
        public ADRawEntry Convert(IList <PropValue> properties)
        {
            ADPropertyBag adpropertyBag = new ADPropertyBag();
            Guid          guid          = Guid.Empty;

            for (int i = 0; i < properties.Count; i++)
            {
                ADPropertyDefinition adpropertyDefinition = this.adProperties[i];
                object obj = this.ConvertValue(adpropertyDefinition, properties[i]);
                if (adpropertyDefinition == NspiPropertyMap.objectGuidPropertyDefinition)
                {
                    guid = (Guid)obj;
                }
                else
                {
                    adpropertyBag.SetField(adpropertyDefinition, obj);
                }
            }
            adpropertyBag.SetField(ADObjectSchema.Id, new ADObjectId(guid));
            return(new ADRawEntry(adpropertyBag));
        }
Exemple #12
0
 // Token: 0x06000E7A RID: 3706 RVA: 0x000456E0 File Offset: 0x000438E0
 public static void CreateUserInformationRecord(Guid mdbGuid, Guid mbxGuid, ADPropertyBag properties)
 {
     PropValue[] properties2 = MbxRecipientSession.PropValuesFromADPropertyBag(properties);
     try
     {
         using (ExRpcAdmin exRpcAdminInstance = MbxRecipientSession.GetExRpcAdminInstance())
         {
             exRpcAdminInstance.CreateUserInfo(mdbGuid, mbxGuid, 0U, properties2);
         }
     }
     catch (MapiExceptionUserInformationAlreadyExists mapiExceptionUserInformationAlreadyExists)
     {
         throw new ADObjectAlreadyExistsException(new LocalizedString(mapiExceptionUserInformationAlreadyExists.Message), mapiExceptionUserInformationAlreadyExists);
     }
     catch (MapiPermanentException innerException)
     {
         throw new ADDriverStoreAccessPermanentException(innerException);
     }
     catch (MapiRetryableException innerException2)
     {
         throw new ADDriverStoreAccessTransientException(innerException2);
     }
 }
        public static ADRawEntry PerformADLookup(ADObjectId identity, List <ADPropertyDefinition> properties)
        {
            ADUser        aduser        = (ADUser)TemplateTenantConfiguration.GetLocalTempateUser().Clone();
            ADPropertyBag adpropertyBag = new ADPropertyBag();

            foreach (ADPropertyDefinition adpropertyDefinition in properties)
            {
                adpropertyBag.SetField(adpropertyDefinition, aduser[adpropertyDefinition]);
                if (adpropertyDefinition.IsCalculated)
                {
                    foreach (ProviderPropertyDefinition providerPropertyDefinition in adpropertyDefinition.SupportingProperties)
                    {
                        ADPropertyDefinition adpropertyDefinition2 = (ADPropertyDefinition)providerPropertyDefinition;
                        adpropertyBag.SetField(adpropertyDefinition2, aduser[adpropertyDefinition2]);
                    }
                }
            }
            ADRawEntry adrawEntry = new ADRawEntry(adpropertyBag);

            adrawEntry.SetId(identity);
            adrawEntry.ValidateRead();
            adrawEntry.ResetChangeTracking(true);
            return(adrawEntry);
        }
Exemple #14
0
        // Token: 0x06000EFF RID: 3839 RVA: 0x000484C4 File Offset: 0x000466C4
        private ADRawEntry ADRawEntryFromMservRecords(ulong puid, IList <MservRecord> mservRecords, IEnumerable <MServPropertyDefinition> properties, string originatingServerName, List <ValidationError> errors)
        {
            ADObjectId    adobjectIdFromPuid = ConsumerIdentityHelper.GetADObjectIdFromPuid(puid);
            ADPropertyBag adpropertyBag      = new ADPropertyBag(this.isReadOnly, 16);

            adpropertyBag.SetField(ADObjectSchema.Id, adobjectIdFromPuid);
            adpropertyBag.SetField(MServRecipientSchema.Puid, puid);
            foreach (MservRecord mservRecord in mservRecords)
            {
                object value = mservRecord;
                ProviderPropertyDefinition providerPropertyDefinition;
                switch (mservRecord.ResourceId)
                {
                case 0:
                    if (mservRecord.SourceKey == null)
                    {
                        providerPropertyDefinition = MServRecipientSchema.MservPrimaryRecord;
                    }
                    else
                    {
                        providerPropertyDefinition = MServRecipientSchema.MservEmailAddressesRecord;
                        value = new MultiValuedProperty <MservRecord>
                        {
                            mservRecord
                        };
                    }
                    break;

                case 1:
                    providerPropertyDefinition = MServRecipientSchema.MservSoftDeletedPrimaryRecord;
                    break;

                case 2:
                case 3:
                case 5:
                case 6:
                    goto IL_D0;

                case 4:
                    providerPropertyDefinition = MServRecipientSchema.MservCalendarRecord;
                    break;

                case 7:
                    providerPropertyDefinition = MServRecipientSchema.MservSecondaryRecord;
                    break;

                case 8:
                    providerPropertyDefinition = MServRecipientSchema.MservSoftDeletedCalendarRecord;
                    break;

                default:
                    goto IL_D0;
                }
                PropertyValidationError propertyValidationError = providerPropertyDefinition.ValidateValue(value, true);
                if (propertyValidationError != null)
                {
                    errors.Add(propertyValidationError);
                }
                adpropertyBag.SetField(providerPropertyDefinition, value);
                continue;
IL_D0:
                throw new NotSupportedException("Unexpected record received:" + mservRecord.ToString());
            }
            ADRawEntry adrawEntry = new ADRawEntry(adpropertyBag);

            adrawEntry.OriginatingServer = originatingServerName;
            adrawEntry.WhenReadUTC       = new DateTime?(DateTime.UtcNow);
            adrawEntry.IsCached          = false;
            adrawEntry.ValidateRead(errors, properties);
            adrawEntry.ResetChangeTracking(true);
            return(adrawEntry);
        }
Exemple #15
0
 internal ADDirSyncResult(ADPropertyBag propertyBag) : base(propertyBag)
 {
 }
Exemple #16
0
 protected override ADObject CreateAndInitializeObject <TResult>(ADPropertyBag propertyBag, ADRawEntry dummyObject)
 {
     return(ADObjectFactory.CreateAndInitializeConfigObject <TResult>(propertyBag, dummyObject, this));
 }
Exemple #17
0
        public static TObject CreateFrom <TObject>(SimpleADObject simpleADObject, ADObjectSchema schema, IEnumerable <PropertyDefinition> additionalProperties) where TObject : ADRawEntry, new()
        {
            ArgumentValidator.ThrowIfNull("simpleADObject", simpleADObject);
            if (typeof(TObject).Equals(typeof(ADRawEntry)))
            {
                throw new ArgumentException("TObject cannot be ADRawEntry");
            }
            ADPropertyBag adpropertyBag = new ADPropertyBag();

            SimpleADObject.SimpleList <SimpleADObject.SimpleADProperty> properties = simpleADObject.Properties;
            SimpleADObject.SimpleADProperty simpleADProperty;
            if (!properties.TryGetValue(ADObjectSchema.Id.LdapDisplayName, out simpleADProperty))
            {
                throw new InvalidOperationException("dn is missing");
            }
            ValidationError validationError;
            ADObjectId      value = (ADObjectId)ADValueConvertor.ConvertFromADAndValidateSingleValue(simpleADProperty.Value as string, ADObjectSchema.Id, false, out validationError);

            adpropertyBag.SetField(ADObjectSchema.Id, value);
            adpropertyBag.SetField(ADObjectSchema.ObjectState, simpleADObject.ObjectState);
            adpropertyBag.SetObjectVersion(simpleADObject.ExchangeVersion);
            TObject tobject = Activator.CreateInstance <TObject>();
            IEnumerable <PropertyDefinition> enumerable;

            if (schema != null)
            {
                enumerable = schema.AllProperties;
            }
            else
            {
                enumerable = ((ADObject)((object)tobject)).Schema.AllProperties;
            }
            if (additionalProperties != null)
            {
                enumerable = enumerable.Concat(additionalProperties);
            }
            foreach (PropertyDefinition propertyDefinition in enumerable)
            {
                ADPropertyDefinition propertyDefinition2 = (ADPropertyDefinition)propertyDefinition;
                SimpleADObject.AddPropertyToPropertyBag(propertyDefinition2, adpropertyBag, properties);
            }
            if (tobject is MiniObject)
            {
                adpropertyBag.SetIsReadOnly(true);
            }
            if (schema != null || (!(tobject is ADRecipient) && !(tobject is MiniRecipient)))
            {
                tobject = (TObject)((object)ADObjectFactory.CreateAndInitializeConfigObject <TObject>(adpropertyBag, tobject, null));
            }
            else
            {
                tobject = (TObject)((object)ADObjectFactory.CreateAndInitializeRecipientObject <TObject>(adpropertyBag, tobject, null));
            }
            tobject.OriginatingServer    = simpleADObject.OriginatingServer;
            tobject.WhenReadUTC          = new DateTime?(simpleADObject.WhenReadUTC);
            tobject.DirectoryBackendType = simpleADObject.DirectoryBackendType;
            tobject.IsCached             = true;
            tobject.ValidateRead();
            tobject.ResetChangeTracking();
            return(tobject);
        }
Exemple #18
0
        private IEnumerable <ADRawEntry> ReadSpecialObjects()
        {
            ADObjectId exchangeServiceObject = base.RootOrgConfigurationSession.ConfigurationNamingContext.GetChildId("Services").GetChildId("Microsoft Exchange");
            int        numberOfLinksToRead   = 1500;
            int        rangeStart            = 0;
            int        rangeEnd = rangeStart + numberOfLinksToRead - 1;

            ADPropertyDefinition[] propertiesToRetrieve = new ADPropertyDefinition[]
            {
                ADObjectSchema.Id
            };
            ADObjectId configUnitDn = new ADObjectId(this.PageToken.TenantConfigUnitObjectGuid);
            ADRawEntry dnResolve    = base.TenantConfigurationSession.ReadADRawEntry(configUnitDn, propertiesToRetrieve);

            configUnitDn = dnResolve.Id;
            ExTraceGlobals.TenantRelocationTracer.TraceDebug <ADObjectId>((long)SyncConfiguration.TraceId, "TenantRelocationSyncConfiguration.ReadSpecialObjects tenant CU DN = {0}", configUnitDn);
            MultiValuedProperty <LinkMetadata> resultValues = new MultiValuedProperty <LinkMetadata>();
            ADRawEntry entry       = null;
            long       maxEntryUSN = 0L;
            bool       done        = false;

            while (!done)
            {
                ADPropertyDefinition      adpropertyDefinition = RangedPropertyHelper.CreateRangedProperty(ADRecipientSchema.LinkMetadata, new IntRange(rangeStart, rangeEnd));
                List <PropertyDefinition> list = new List <PropertyDefinition>();
                list.Add(adpropertyDefinition);
                list.Add(ADRecipientSchema.UsnChanged);
                entry = base.RootOrgConfigurationSession.RetrieveTenantRelocationSyncObject(exchangeServiceObject, list);
                ExTraceGlobals.TenantRelocationTracer.TraceDebug <string>((long)SyncConfiguration.TraceId, "TenantRelocationSyncConfiguration.ReadSpecialObjects object read: {0}", entry.Id.DistinguishedName);
                if ((long)entry[ADRecipientSchema.UsnChanged] < this.PageToken.SpecialObjectsUSN)
                {
                    ExTraceGlobals.TenantRelocationTracer.TraceDebug <object, long>((long)SyncConfiguration.TraceId, "TenantRelocationSyncConfiguration.ReadSpecialObjects USNChanged({0} < this.PageToken.SpecialObjectsUSN({1})", entry[ADRecipientSchema.UsnChanged], this.PageToken.SpecialObjectsUSN);
                    break;
                }
                MultiValuedProperty <LinkMetadata> multiValuedProperty = (MultiValuedProperty <LinkMetadata>)entry[adpropertyDefinition];
                foreach (LinkMetadata linkMetadata in multiValuedProperty)
                {
                    if (linkMetadata.LocalUpdateSequenceNumber >= this.PageToken.SpecialObjectsUSN)
                    {
                        ADObjectId adobjectId = new ADObjectId(linkMetadata.TargetDistinguishedName);
                        if (adobjectId.IsDescendantOf(configUnitDn))
                        {
                            ExTraceGlobals.TenantRelocationTracer.TraceDebug <string, long>((long)SyncConfiguration.TraceId, "TenantRelocationSyncConfiguration.ReadSpecialObjects valid link found: {0}, USN={1}", linkMetadata.TargetDistinguishedName, linkMetadata.LocalUpdateSequenceNumber);
                            if (linkMetadata.LocalUpdateSequenceNumber > maxEntryUSN)
                            {
                                maxEntryUSN = linkMetadata.LocalUpdateSequenceNumber;
                            }
                            resultValues.Add(linkMetadata);
                        }
                    }
                }
                if (multiValuedProperty.ValueRange != null && multiValuedProperty.ValueRange.UpperBound != 2147483647)
                {
                    rangeStart += numberOfLinksToRead;
                    rangeEnd    = rangeStart + numberOfLinksToRead - 1;
                    ExTraceGlobals.TenantRelocationTracer.TraceDebug <int, int>((long)SyncConfiguration.TraceId, "TenantRelocationSyncConfiguration.ReadSpecialObjects retrieve next page: rangeStart={0}, rangeEnd={1}", rangeStart, rangeEnd);
                }
                else
                {
                    done = true;
                    ExTraceGlobals.TenantRelocationTracer.TraceDebug((long)SyncConfiguration.TraceId, "TenantRelocationSyncConfiguration.ReadSpecialObjects page retrieval ends");
                }
            }
            this.PageToken.SpecialObjectsUSN = ((maxEntryUSN == 0L) ? long.MaxValue : (maxEntryUSN + 1L));
            ExTraceGlobals.TenantRelocationTracer.TraceDebug <long>((long)SyncConfiguration.TraceId, "TenantRelocationSyncConfiguration.ReadSpecialObjects SpecialObjectsUSN is set to {0}", this.PageToken.SpecialObjectsUSN);
            ExTraceGlobals.TenantRelocationTracer.TraceDebug <int>((long)SyncConfiguration.TraceId, "TenantRelocationSyncConfiguration.ReadSpecialObjects Number of values found = {0}", resultValues.Count);
            if (resultValues.Count > 0)
            {
                ADPropertyBag propertyBag = new ADPropertyBag();
                propertyBag.SetField(ADObjectSchema.Id, entry.Id);
                propertyBag.SetField(ADRecipientSchema.UsnChanged, entry[ADRecipientSchema.UsnChanged]);
                propertyBag.SetField(ADRecipientSchema.LinkMetadata, resultValues);
                propertyBag.SetField(SyncObjectSchema.Deleted, false);
                TenantRelocationSyncObject specialObject = new TenantRelocationSyncObject(propertyBag, new DirectoryAttribute[0]);
                yield return(specialObject);
            }
            yield break;
        }
Exemple #19
0
 internal TenantRelocationSyncObject(ADPropertyBag propertyBag, DirectoryAttribute[] directoryAttributes) : base(propertyBag)
 {
     this.RawLdapSearchResult = directoryAttributes;
 }