示例#1
0
        // Token: 0x060003C2 RID: 962 RVA: 0x0001A7F0 File Offset: 0x000189F0
        private bool FaiExists(MailboxSession mailboxSession)
        {
            UserConfiguration userConfiguration = ElcMailboxHelper.OpenFaiMessage(mailboxSession, "MRM", true);

            if (userConfiguration == null)
            {
                ElcSubAssistant.Tracer.TraceDebug((long)this.GetHashCode(), "FAI cannot be found or created.");
                return(false);
            }
            Dictionary <Guid, StoreTagData> dictionary = null;

            try
            {
                dictionary = MrmFaiFormatter.Deserialize(userConfiguration, mailboxSession.MailboxOwner);
            }
            catch (ObjectNotFoundException arg)
            {
                ElcSubAssistant.Tracer.TraceDebug <ObjectNotFoundException>((long)this.GetHashCode(), "Deserialize of MRM FAI message failed because it could not be found. Exception: {0}", arg);
                return(false);
            }
            finally
            {
                if (userConfiguration != null)
                {
                    userConfiguration.Dispose();
                }
            }
            return(dictionary != null && dictionary.Count > 0);
        }
示例#2
0
        private void LogonPrimary(ExchangePrincipal primaryEP)
        {
            using (MailboxSession mailboxSession = MailboxSession.OpenAsSystemService(primaryEP, CultureInfo.InvariantCulture, "Client=Monitoring;Action=Test-ArchiveConnectivity"))
            {
                if (mailboxSession != null)
                {
                    UserConfiguration userConfiguration = ElcMailboxHelper.OpenFaiMessage(mailboxSession, "MRM", false);
                    if (userConfiguration != null)
                    {
                        using (Stream xmlStream = userConfiguration.GetXmlStream())
                        {
                            using (StreamReader streamReader = new StreamReader(xmlStream))
                            {
                                this.primaryFAI = streamReader.ReadToEnd();
                            }
                            goto IL_63;
                        }
                    }
                    this.primaryFAI = "No FAI found in Primary Mailbox.";
IL_63:
                    this.primaryLastProcessedTime = this.ReadMailboxTableProperties(mailboxSession);
                    if (!string.IsNullOrEmpty(this.MessageId))
                    {
                        this.GetELCItemProperties(mailboxSession, this.MessageId);
                    }
                }
            }
        }
 // Token: 0x0600041F RID: 1055 RVA: 0x0001D65A File Offset: 0x0001B85A
 internal void EnsureUserConfigurationIsValid()
 {
     if (this.configItem == null)
     {
         this.configItem = ElcMailboxHelper.OpenFaiMessage(base.MailboxSession, "MRM", true);
         if (this.configItem == null)
         {
             throw new TransientMailboxException(Strings.descFAIAvailabilityCannotBeDetermined);
         }
     }
 }
		private static void FetchRetentionPolcyTagDataFromXSO(StoreRetentionPolicyTagHelper srpth)
		{
			if (srpth.exchangePrincipal == null)
			{
				ExTraceGlobals.ELCTracer.TraceDebug(0L, "Cannot fetch retention policy tag data because Exchange principal is not available.");
				return;
			}
			srpth.mailboxSession = MailboxSession.OpenAsAdmin(srpth.exchangePrincipal, CultureInfo.InvariantCulture, "Client=Management;Action=Get-/Set-RetentionPolicyTag");
			srpth.configItem = ElcMailboxHelper.OpenFaiMessage(srpth.mailboxSession, "MRM", true);
			if (srpth.configItem != null)
			{
				srpth.TagData = MrmFaiFormatter.Deserialize(srpth.configItem, srpth.exchangePrincipal, out srpth.deletedTags, out srpth.retentionHoldData, true, out srpth.defaultArchiveTagData, out srpth.fullCrawlRequired);
				return;
			}
			srpth.TagData = new Dictionary<Guid, StoreTagData>();
		}
示例#5
0
        private bool LogonArchive(ExchangePrincipal mailboxEP)
        {
            bool result;

            using (MailboxSession mailboxSession = MailboxSession.OpenAsSystemService(mailboxEP, CultureInfo.InvariantCulture, "Client=Monitoring;Action=Test-ArchiveConnectivity"))
            {
                if (mailboxSession != null)
                {
                    if (this.IncludeArchiveMRMConfiguration || !string.IsNullOrEmpty(this.MessageId))
                    {
                        UserConfiguration userConfiguration = ElcMailboxHelper.OpenFaiMessage(mailboxSession, "MRM", false);
                        if (userConfiguration != null)
                        {
                            using (Stream xmlStream = userConfiguration.GetXmlStream())
                            {
                                using (StreamReader streamReader = new StreamReader(xmlStream))
                                {
                                    this.archiveFAI = streamReader.ReadToEnd();
                                }
                                goto IL_80;
                            }
                        }
                        this.archiveFAI = "No FAI found in Archive Mailbox.";
IL_80:
                        this.archiveLastProcessedTime = this.ReadMailboxTableProperties(mailboxSession);
                        if (!string.IsNullOrEmpty(this.MessageId))
                        {
                            this.GetELCItemProperties(mailboxSession, this.MessageId);
                        }
                    }
                    result = true;
                }
                else
                {
                    result = false;
                }
            }
            return(result);
        }