internal static void ReadEaiConfig() { try { using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\ExchangeServer\\v15\\Diagnostics")) { if (registryKey != null) { object value = registryKey.GetValue("EaiEnabled"); if (value != null) { bool.TryParse(value.ToString(), out InternalConfiguration.eaiEnabled); } } } } catch (SecurityException exception) { InternalConfiguration.HandleRegistryReadError(exception); } catch (UnauthorizedAccessException exception2) { InternalConfiguration.HandleRegistryReadError(exception2); } catch (IOException exception3) { InternalConfiguration.HandleRegistryReadError(exception3); } }
private static bool IsEaiEnabled() { bool result; try { result = InternalConfiguration.IsEaiEnabled(); } catch (Exception) { result = false; } return(result); }
static InternalConfiguration() { InternalConfiguration.ReadEaiConfig(); }