// Token: 0x06000BF7 RID: 3063 RVA: 0x00031E60 File Offset: 0x00030060 private void WriteAppStatuesToMailbox() { if (this.appStatuses.Count == 0) { return; } GetUpdates.Tracer.TraceDebug <int>(0L, "GetUpdates.ConfigAppStatus: Config app status for {0} extensions.", this.appStatuses.Count); Exception ex = InstalledExtensionTable.RunClientExtensionAction(delegate { using (MailboxSession mailboxSession = MailboxSession.OpenAsSystemService(this.queryContext.ExchangePrincipal, this.queryContext.CultureInfo, this.queryContext.ClientInfoString)) { using (InstalledExtensionTable installedExtensionTable = InstalledExtensionTable.CreateInstalledExtensionTable(this.queryContext.Domain, this.queryContext.IsUserScope, this.queryContext.OrgEmptyMasterTableCache, mailboxSession)) { foreach (KeyValuePair <string, string> keyValuePair in this.appStatuses) { installedExtensionTable.ConfigureAppStatus(keyValuePair.Key, keyValuePair.Value); } installedExtensionTable.SaveXML(); } } }); if (ex != null) { GetUpdates.Tracer.TraceError <Exception>(0L, "GetUpdates.ConfigAppStatus: Config app status failed. Exception: {0}", ex); ExtensionDiagnostics.Logger.LogEvent(ApplicationLogicEventLogConstants.Tuple_FailedToConfigAppStatus, null, new object[] { "ProcessUpdates", ExtensionDiagnostics.GetLoggedMailboxIdentifier(this.queryContext.ExchangePrincipal), ExtensionDiagnostics.GetLoggedExceptionString(ex) }); } }
// Token: 0x06000BF5 RID: 3061 RVA: 0x00031C20 File Offset: 0x0002FE20 internal void InstallExtensionUpdates(List <ExtensionData> updates, UpdateQueryContext queryContext) { GetUpdates.Tracer.TraceDebug <int>(0L, "GetUpdates.InstallExtensionUpdates: Installing {0} extensions.", updates.Count); ExtensionData currentExtensionData = null; Exception ex = InstalledExtensionTable.RunClientExtensionAction(delegate { using (MailboxSession mailboxSession = MailboxSession.OpenAsSystemService(queryContext.ExchangePrincipal, queryContext.CultureInfo, queryContext.ClientInfoString)) { using (InstalledExtensionTable installedExtensionTable = InstalledExtensionTable.CreateInstalledExtensionTable(queryContext.Domain, queryContext.IsUserScope, queryContext.OrgEmptyMasterTableCache, mailboxSession)) { foreach (ExtensionData currentExtensionData in updates) { currentExtensionData = currentExtensionData; GetUpdates.Tracer.TraceDebug <string>(0L, "GetUpdates.InstallExtensionUpdates: Installing asset {0}", currentExtensionData.MarketplaceAssetID); installedExtensionTable.AddExtension(currentExtensionData, true); currentExtensionData = null; } installedExtensionTable.SaveXML(); } } }); string text = (currentExtensionData == null) ? string.Empty : currentExtensionData.MarketplaceAssetID; if (ex != null) { GetUpdates.Tracer.TraceError <string, Exception>(0L, "GetUpdates.InstallExtensionUpdates: Installation failed for extension {0}. Exception: {1}", text, ex); ExtensionDiagnostics.Logger.LogEvent(ApplicationLogicEventLogConstants.Tuple_ExtensionUpdateFailed, null, new object[] { "UpdateExtension", ExtensionDiagnostics.GetLoggedMailboxIdentifier(queryContext.ExchangePrincipal), text, ExtensionDiagnostics.GetLoggedExceptionString(ex) }); } else { ExtensionDiagnostics.LogToDatacenterOnly(ApplicationLogicEventLogConstants.Tuple_ExtensionUpdateSuccess, null, new object[] { "UpdateExtension", ExtensionDiagnostics.GetLoggedMailboxIdentifier(queryContext.ExchangePrincipal), text }); } this.ExecuteNextUpdateQuery(); }
private void WriteTokensToMailbox() { if (this.downloadedTokens.Count == 0 && this.appStatuses.Count == 0) { return; } GetTokens.Tracer.TraceDebug <int, int>(0L, "GetTokens.WriteTokensToMailbox: Writing renewed tokens for {0} apps, failure error codes for {0} apps.", this.downloadedTokens.Count, this.appStatuses.Count); Exception ex = InstalledExtensionTable.RunClientExtensionAction(delegate { using (MailboxSession mailboxSession = MailboxSession.OpenAsSystemService(this.queryContext.ExchangePrincipal, this.queryContext.CultureInfo, this.queryContext.ClientInfoString)) { using (InstalledExtensionTable installedExtensionTable = InstalledExtensionTable.CreateInstalledExtensionTable(this.queryContext.Domain, this.queryContext.IsUserScope, this.queryContext.OrgEmptyMasterTableCache, mailboxSession)) { foreach (KeyValuePair <string, string> keyValuePair in this.downloadedTokens) { installedExtensionTable.ConfigureEtoken(keyValuePair.Key, keyValuePair.Value, true); } foreach (KeyValuePair <string, string> keyValuePair2 in this.appStatuses) { installedExtensionTable.ConfigureAppStatus(keyValuePair2.Key, keyValuePair2.Value); } installedExtensionTable.SaveXML(); } } }); if (ex != null) { GetTokens.Tracer.TraceError <Exception>(0L, "GetTokens.WriteTokensToMailbox: Writing renewed tokens failed. Exception: {0}", ex); ExtensionDiagnostics.Logger.LogEvent(ApplicationLogicEventLogConstants.Tuple_FailedToWritebackRenewedTokens, null, new object[] { "ProcessTokenRenew", ExtensionDiagnostics.GetLoggedMailboxIdentifier(this.queryContext.ExchangePrincipal), ExtensionDiagnostics.GetLoggedExceptionString(ex) }); return; } ExtensionDiagnostics.LogToDatacenterOnly(ApplicationLogicEventLogConstants.Tuple_ProcessTokenRenewCompleted, null, new object[] { "ProcessTokenRenew", ExtensionDiagnostics.GetLoggedMailboxIdentifier(this.queryContext.ExchangePrincipal) }); }