예제 #1
0
 public static TxSyncConnectedAccountsNotificationManager Create(MailboxSession mailboxSession, UserContext userContext)
 {
     if (ConnectedAccountsNotificationManagerBase.ShouldSetupNotificationManagerForUser(mailboxSession, userContext) && TxSyncConnectedAccountsNotificationManager.ShouldSetupNotificationManagerForUser(mailboxSession))
     {
         IExchangePrincipal mailboxOwner = mailboxSession.MailboxOwner;
         ExTraceGlobals.ConnectedAccountsTracer.TraceDebug <Guid, Guid, string>((long)userContext.GetHashCode(), "TxSyncConnectedAccountsNotificationManager.Create::Setting up ConnectedAccountsNotificationManager for User (MailboxGuid:{0}, MdbGuid:{1}, ServerFullyQualifiedDomainName:{2}).", mailboxOwner.MailboxInfo.MailboxGuid, mailboxOwner.MailboxInfo.GetDatabaseGuid(), mailboxOwner.MailboxInfo.Location.ServerFqdn);
         return(new TxSyncConnectedAccountsNotificationManager(mailboxOwner.MailboxInfo.MailboxGuid, mailboxOwner.MailboxInfo.GetDatabaseGuid(), mailboxOwner.MailboxInfo.Location.ServerFqdn));
     }
     return(null);
 }
예제 #2
0
        private void SetupTxSyncNotificationManager(MailboxSession mailboxSession)
        {
            if (!VariantConfiguration.InvariantNoFlightingSnapshot.OwaDeployment.ConnectedAccountsSync.Enabled || !ConnectedAccountsConfiguration.Instance.NotificationsEnabled)
            {
                ExTraceGlobals.ConnectedAccountsTracer.TraceDebug((long)this.GetHashCode(), "UserContext.SetupTxSyncNotificationManager - ConnectedAccountsNotificationManager was not set because no DC or Notifications not enabled.");
                return;
            }
            IConnectedAccountsNotificationManager connectedAccountsNotificationManager = TxSyncConnectedAccountsNotificationManager.Create(mailboxSession, this);

            if (connectedAccountsNotificationManager != null)
            {
                this.connectedAccountNotificationManagers.Add(connectedAccountsNotificationManager);
            }
        }