// Token: 0x060014F1 RID: 5361 RVA: 0x00078148 File Offset: 0x00076348 private void SendSignalsForMailbox(MailboxSession session, ILogger logger) { SharePointFlighted sharePointFlighted = new SharePointFlighted(logger); ISharePointUrl sharePointUrl = this.SharePointUrlFactory.CreateADWithDictFallbackSharePointUrl(new ADSharePointUrl(), new DictSharePointUrl(), logger); ADUser aduser = (ADUser)DirectoryHelper.ReadADRecipient(session.MailboxOwner.MailboxInfo.MailboxGuid, session.MailboxOwner.MailboxInfo.IsArchive, session.GetADRecipientSession(true, ConsistencyMode.IgnoreInvalid)); ICredentials credentials = this.GetCredentials(aduser); if (sharePointFlighted.IsUserFlighted(aduser)) { string url = sharePointUrl.GetUrl(session.MailboxOwner, session.GetADRecipientSession(true, ConsistencyMode.IgnoreInvalid)); if (string.IsNullOrEmpty(url)) { return; } using (Folder folder = Folder.Bind(session, DefaultFolderType.Inbox, new PropertyDefinition[] { FolderSchema.OfficeGraphLocation })) { string value = folder.TryGetProperty(FolderSchema.OfficeGraphLocation) as string; if (string.IsNullOrEmpty(value)) { folder[FolderSchema.OfficeGraphLocation] = url; folder.Save(); } } SharePointSignalRestSender sharePointSignalRestSender = new SharePointSignalRestSender(credentials, url, logger); SharePointSignalRestDataProvider sharePointSignalRestDataProvider = new SharePointSignalRestDataProvider(); sharePointSignalRestDataProvider.AddAnalyticsSignalSource(new RecipientCacheSignalSource(session)); sharePointSignalRestDataProvider.ProvideDataFor(sharePointSignalRestSender); if (sharePointSignalRestDataProvider.AnyDataProvided()) { sharePointSignalRestDataProvider.PrintProviderReport(logger); try { sharePointSignalRestSender.Send(); } catch (WebException ex) { if (SharePointSignalStoreAssistant.IsWebExceptionUnauthorized(ex)) { throw; } throw new SharePointSignalStoreException("Failed to send signals to SharePoint", ex); } logger.LogInfo("Successfully sent signals", new object[0]); return; } logger.LogInfo("No Recipient Cache retrieved for mailbox.", new object[0]); } }
// Token: 0x060014F9 RID: 5369 RVA: 0x00078340 File Offset: 0x00076540 public ISharePointUrl CreateADWithDictFallbackSharePointUrl(ISharePointUrl adSharePointUrl, ISharePointUrl fallbackSharePointUrl, ILogger logger) { return(new ADWithDictFallbackSharePointUrl(adSharePointUrl, fallbackSharePointUrl, logger)); }
// Token: 0x060014AE RID: 5294 RVA: 0x0007722A File Offset: 0x0007542A public ADWithDictFallbackSharePointUrl(ISharePointUrl adSharePointUrl, ISharePointUrl fallbackSharePointUrl, ILogger logger) { this.adUrl = adSharePointUrl; this.fallbackUrl = fallbackSharePointUrl; this.logger = logger2; }