private static ExchangeAssistance GetExchangeAssistanceObjectFromADWithRetry(OrganizationId organizationId) { int num = 0; ExchangeAssistance exchangeAssistance = null; while (exchangeAssistance == null && num < 6) { exchangeAssistance = HelpProvider.GetExchangeAssistanceObjectFromAD(organizationId); if (exchangeAssistance == null) { num++; Thread.Sleep(10000); } } return(exchangeAssistance); }
protected override HelpProviderCache.Item CreateOnCacheMiss(OrganizationId key, ref bool shouldAdd) { shouldAdd = true; ExchangeAssistance exchangeAssistanceObjectFromAD = HelpProvider.GetExchangeAssistanceObjectFromAD(key); Uri privacyStatementUrl = null; Uri communityUrl = null; bool?privacyLinkDisplayEnabled = null; if (exchangeAssistanceObjectFromAD != null) { if (exchangeAssistanceObjectFromAD.CommunityLinkDisplayEnabled) { communityUrl = exchangeAssistanceObjectFromAD.CommunityURL; } privacyLinkDisplayEnabled = new bool?(exchangeAssistanceObjectFromAD.PrivacyLinkDisplayEnabled); if (exchangeAssistanceObjectFromAD.PrivacyLinkDisplayEnabled) { privacyStatementUrl = exchangeAssistanceObjectFromAD.PrivacyStatementURL; } } return(new HelpProviderCache.Item(privacyStatementUrl, communityUrl, privacyLinkDisplayEnabled)); }
private static void LoadBaseUrlViaADSession(HelpProvider.HelpAppName appName) { ExchangeAssistance exchangeAssistanceObjectFromAD = HelpProvider.GetExchangeAssistanceObjectFromAD(OrganizationId.ForestWideOrgId); if (exchangeAssistanceObjectFromAD != null) { HelpProvider.RegisterChangeNotification(exchangeAssistanceObjectFromAD.Id); if (appName.Equals(HelpProvider.HelpAppName.Ecp) || appName.Equals(HelpProvider.HelpAppName.TenantMonitoring)) { if (exchangeAssistanceObjectFromAD.ControlPanelHelpURL != null) { HelpProvider.baseUrl = Utilities.NormalizeUrl(exchangeAssistanceObjectFromAD.ControlPanelHelpURL); } if (exchangeAssistanceObjectFromAD.ControlPanelFeedbackEnabled) { HelpProvider.controlPanelFeedbackUrl = exchangeAssistanceObjectFromAD.ControlPanelFeedbackURL; } else { HelpProvider.controlPanelFeedbackUrl = null; } } else if (appName.Equals(HelpProvider.HelpAppName.Owa)) { if (exchangeAssistanceObjectFromAD.OWALightHelpURL != null) { HelpProvider.baseOwaLightUrl = exchangeAssistanceObjectFromAD.OWALightHelpURL; } if (exchangeAssistanceObjectFromAD.OWAHelpURL != null) { HelpProvider.baseOwaPremiumUrl = exchangeAssistanceObjectFromAD.OWAHelpURL; } if (exchangeAssistanceObjectFromAD.OWAFeedbackEnabled) { HelpProvider.owaPremiumFeedbackUrl = exchangeAssistanceObjectFromAD.OWAFeedbackURL; } else { HelpProvider.owaPremiumFeedbackUrl = null; } if (exchangeAssistanceObjectFromAD.OWALightFeedbackEnabled) { HelpProvider.owaLightFeedbackUrl = exchangeAssistanceObjectFromAD.OWALightFeedbackURL; } else { HelpProvider.owaLightFeedbackUrl = null; } } if (exchangeAssistanceObjectFromAD.PrivacyLinkDisplayEnabled) { HelpProvider.privacyStatementUrl = exchangeAssistanceObjectFromAD.PrivacyStatementURL; } else { HelpProvider.privacyStatementUrl = null; } if (exchangeAssistanceObjectFromAD.WindowsLiveAccountURLEnabled) { HelpProvider.windowsLiveAccountUrl = exchangeAssistanceObjectFromAD.WindowsLiveAccountPageURL; } else { HelpProvider.windowsLiveAccountUrl = null; } if (exchangeAssistanceObjectFromAD.CommunityLinkDisplayEnabled) { HelpProvider.communityUrl = exchangeAssistanceObjectFromAD.CommunityURL; return; } HelpProvider.communityUrl = null; } }