Пример #1
0
 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);
     }
 }
Пример #2
0
        private static bool IsEaiEnabled()
        {
            bool result;

            try
            {
                result = InternalConfiguration.IsEaiEnabled();
            }
            catch (Exception)
            {
                result = false;
            }
            return(result);
        }
Пример #3
0
 static InternalConfiguration()
 {
     InternalConfiguration.ReadEaiConfig();
 }