// Token: 0x060003F6 RID: 1014 RVA: 0x0001C798 File Offset: 0x0001A998
        private bool InvokeInternal(MailboxDataForTags mailboxDataForTags)
        {
            TagProvisioner.Tracer.TraceDebug <TagProvisioner, IExchangePrincipal>((long)this.GetHashCode(), "{0}: TagProvisioner invoked for for mailbox '{1}'.", this, mailboxDataForTags.MailboxSession.MailboxOwner);
            ElcUserTagInformation elcUserTagInformation = (ElcUserTagInformation)mailboxDataForTags.ElcUserInformation;
            bool      flag      = false;
            TagChange tagChange = new TagChange();

            if (mailboxDataForTags.MailboxSession.MailboxOwner.RecipientType != RecipientType.MailUser)
            {
                MailboxUpgrader  mailboxUpgrader  = new MailboxUpgrader(elcUserTagInformation);
                UpgradeStatus    upgradeStatus    = mailboxUpgrader.UpgradeIfNecessary();
                ADChangeDetector adchangeDetector = new ADChangeDetector(mailboxDataForTags);
                tagChange = adchangeDetector.Detect();
                if (tagChange.ChangeType != ChangeType.None || (upgradeStatus & UpgradeStatus.AppliedFolderTag) != UpgradeStatus.None)
                {
                    flag = true;
                    elcUserTagInformation.FullCrawlRequired = true;
                }
            }
            else if (elcUserTagInformation.FullCrawlRequired)
            {
                flag = true;
            }
            mailboxDataForTags.StatisticsLogEntry.IsFullCrawlNeeded = flag;
            Synchronizer synchronizer = new Synchronizer(mailboxDataForTags, this.elcAssistant, flag);

            synchronizer.Invoke();
            return(elcUserTagInformation.SaveConfigItem(mailboxDataForTags.ArchiveProcessor));
        }
Beispiel #2
0
        // Token: 0x060003A1 RID: 929 RVA: 0x0001980C File Offset: 0x00017A0C
        internal TagChange Detect()
        {
            TagChange tagChange = new TagChange();

            tagChange.ChangeType = ChangeType.None;
            this.UpdateStoreTags(tagChange);
            this.LookForNewTagsInAD(tagChange);
            this.CheckForRecreatedTags(tagChange);
            return(tagChange);
        }
Beispiel #3
0
 // Token: 0x060003A9 RID: 937 RVA: 0x0001A52C File Offset: 0x0001872C
 private void DeleteTag(TagChange tagChange, Guid storeTagGuid)
 {
     tagChange.ChangeType |= ChangeType.Other;
     tagChange.DeletedTags.Add(storeTagGuid);
     if (this.elcUserInfo.StoreTagDictionary[storeTagGuid].Tag.Type == ElcFolderType.Personal)
     {
         this.mailboxDataForTags.PersonalTagDeleted = true;
     }
     this.elcUserInfo.StoreTagDictionary.Remove(storeTagGuid);
 }
Beispiel #4
0
        // Token: 0x060003A6 RID: 934 RVA: 0x00019F18 File Offset: 0x00018118
        private void UpdateContentSettings(Guid storeTagGuid, TagChange tagChange)
        {
            bool flag = this.UpdateStoreContentSettings(storeTagGuid);

            flag |= this.LookForNewContentSettingsInAd(storeTagGuid);
            if (flag)
            {
                ADChangeDetector.Tracer.TraceDebug <ADChangeDetector, string>((long)this.GetHashCode(), "{0}: UpdateContentSettings: Content Settings for Tag '{1}' changed.", this, this.elcUserInfo.StoreTagDictionary[storeTagGuid].Tag.Name);
                tagChange.ChangeType |= ChangeType.ContentSettings;
                if (!tagChange.TagsWithContentSettingsChange.Contains(storeTagGuid))
                {
                    tagChange.TagsWithContentSettingsChange.Add(storeTagGuid);
                }
            }
        }
Beispiel #5
0
        // Token: 0x060003A4 RID: 932 RVA: 0x00019D3C File Offset: 0x00017F3C
        private void CheckForRecreatedTags(TagChange tagChange)
        {
            List <Guid> list = new List <Guid>();

            foreach (Guid guid in this.elcUserInfo.DeletedTags)
            {
                if (this.elcUserInfo.AllAdTags.ContainsKey(guid))
                {
                    tagChange.ChangeType = ChangeType.Other;
                }
                else
                {
                    list.Add(guid);
                }
            }
            this.elcUserInfo.DeletedTags = list;
        }
Beispiel #6
0
 // Token: 0x060003A2 RID: 930 RVA: 0x0001983C File Offset: 0x00017A3C
 private void UpdateStoreTags(TagChange tagChange)
 {
     Guid[] array = new Guid[this.elcUserInfo.StoreTagDictionary.Keys.Count];
     this.elcUserInfo.StoreTagDictionary.Keys.CopyTo(array, 0);
     foreach (Guid guid in array)
     {
         if (!this.elcUserInfo.AllAdTags.ContainsKey(guid))
         {
             ADChangeDetector.Tracer.TraceDebug <ADChangeDetector, string>((long)this.GetHashCode(), "{0}: UpdateStoreTags: tag '{1}' has been deleted from AD.", this, this.elcUserInfo.StoreTagDictionary[guid].Tag.Name);
             this.DeleteTag(tagChange, guid);
         }
         else
         {
             ADChangeDetector.Tracer.TraceDebug <ADChangeDetector, string>((long)this.GetHashCode(), "{0}: UpdateStoreTags: tag '{1}' exists in AD.", this, this.elcUserInfo.StoreTagDictionary[guid].Tag.Name);
             Guid key = Guid.Empty;
             if (this.elcUserInfo.AllAdTags.ContainsKey(guid))
             {
                 key = this.elcUserInfo.AllAdTags[guid].Tag.Guid;
             }
             if (key.Equals(Guid.Empty) || !this.elcUserInfo.TagsInUserPolicy.ContainsKey(key))
             {
                 if (this.elcUserInfo.StoreTagDictionary[guid].Tag.Type != ElcFolderType.Personal)
                 {
                     ADChangeDetector.Tracer.TraceDebug <ADChangeDetector, string>((long)this.GetHashCode(), "{0}: UpdateStoreTags: system tag '{1}' is no longer in policy.", this, this.elcUserInfo.StoreTagDictionary[guid].Tag.Name);
                     this.DeleteTag(tagChange, guid);
                     goto IL_203;
                 }
                 if (!this.elcUserInfo.StoreTagDictionary[guid].OptedInto)
                 {
                     ADChangeDetector.Tracer.TraceDebug <ADChangeDetector, string>((long)this.GetHashCode(), "{0}: UpdateStoreTags: personal tag '{1}' is no longer in policy.", this, this.elcUserInfo.StoreTagDictionary[guid].Tag.Name);
                     this.elcUserInfo.StoreTagDictionary[guid].IsVisible = false;
                     this.mailboxDataForTags.PersonalTagDeleted          = true;
                 }
             }
             this.UpdateTagMetadata(guid);
             this.UpdateContentSettings(guid, tagChange);
         }
         IL_203 :;
     }
 }
Beispiel #7
0
 // Token: 0x060003A3 RID: 931 RVA: 0x00019A5C File Offset: 0x00017C5C
 private void LookForNewTagsInAD(TagChange tagChange)
 {
     foreach (Guid key in this.elcUserInfo.TagsInUserPolicy.Keys)
     {
         bool flag  = ElcMailboxHelper.IsArchiveTag(this.elcUserInfo.TagsInUserPolicy[key], false);
         bool flag2 = this.elcUserInfo.MailboxSession.MailboxOwner.MailboxInfo.IsArchive && flag;
         if (!this.elcUserInfo.StoreTagDictionary.ContainsKey(this.elcUserInfo.EffectiveGuidMapping[key]))
         {
             if (this.elcUserInfo.TagsInUserPolicy[key].Tag.Type == ElcFolderType.All && flag)
             {
                 ADChangeDetector.Tracer.TraceDebug <ADChangeDetector, string>((long)this.GetHashCode(), "{0}: LookForNewTagsInAD: Default MTA tag: {1}. Skip checks for this tag.", this, this.elcUserInfo.TagsInUserPolicy[key].Tag.Name);
             }
             else
             {
                 ADChangeDetector.Tracer.TraceDebug <ADChangeDetector, string, ElcFolderType>((long)this.GetHashCode(), "{0}: LookForNewTagsInAD: A new tag '{1}' of type {2} was found in AD.", this, this.elcUserInfo.TagsInUserPolicy[key].Tag.Name, this.elcUserInfo.TagsInUserPolicy[key].Tag.Type);
                 if (this.elcUserInfo.TagsInUserPolicy[key].Tag.Type != ElcFolderType.Personal)
                 {
                     tagChange.ChangeType |= ChangeType.Other;
                 }
                 this.elcUserInfo.StoreTagDictionary[this.elcUserInfo.EffectiveGuidMapping[key]] = new StoreTagData(this.elcUserInfo.TagsInUserPolicy[key]);
                 if (flag2)
                 {
                     ADChangeDetector.Tracer.TraceDebug <ADChangeDetector, string>((long)this.GetHashCode(), "{0}: LookForNewTagsInAD: MTA tag: {1} in the archive mbx. Set IsVisible to false.", this, this.elcUserInfo.TagsInUserPolicy[key].Tag.Name);
                     this.elcUserInfo.StoreTagDictionary[this.elcUserInfo.EffectiveGuidMapping[key]].IsVisible = false;
                 }
                 this.UpdateStoreContentSettings(this.elcUserInfo.EffectiveGuidMapping[key]);
             }
         }
         else
         {
             ADChangeDetector.Tracer.TraceDebug <ADChangeDetector, string, ElcFolderType>((long)this.GetHashCode(), "{0}: LookForNewTagsInAD: Tag '{1}' of type {2} exists in FAI.", this, this.elcUserInfo.TagsInUserPolicy[key].Tag.Name, this.elcUserInfo.TagsInUserPolicy[key].Tag.Type);
             if (this.elcUserInfo.TagsInUserPolicy[key].Tag.Type == ElcFolderType.Personal && !flag2)
             {
                 this.elcUserInfo.StoreTagDictionary[this.elcUserInfo.EffectiveGuidMapping[key]].IsVisible = true;
             }
         }
     }
 }