コード例 #1
0
 // Token: 0x0600001A RID: 26 RVA: 0x0000337C File Offset: 0x0000157C
 private void SetThreadPoolLimits(TransportAppConfig transportAppConfig)
 {
     this.minIoThreads     = transportAppConfig.WorkerProcess.MinIOThreads;
     this.minWorkerThreads = transportAppConfig.WorkerProcess.MinWorkerThreads;
     ThreadPool.SetMinThreads(this.minWorkerThreads, this.minIoThreads);
     this.maxIoThreads     = transportAppConfig.WorkerProcess.MaxIOThreads;
     this.maxWorkerThreads = transportAppConfig.WorkerProcess.MaxWorkerThreads;
     ThreadPool.SetMaxThreads(this.maxWorkerThreads, this.maxIoThreads);
 }
コード例 #2
0
        // Token: 0x06000028 RID: 40 RVA: 0x000037A8 File Offset: 0x000019A8
        internal static TimeSpan GetConfigTimeSpan(string label, TimeSpan minimumValue, TimeSpan maximumValue, TimeSpan defaultValue)
        {
            TimeSpan result;

            try
            {
                result = TransportAppConfig.GetConfigTimeSpan(label, minimumValue, maximumValue, defaultValue);
            }
            catch (ConfigurationErrorsException)
            {
                result = defaultValue;
            }
            return(result);
        }
コード例 #3
0
        private static int GetConfigInt(string label, int minimumValue, int maximumValue, int defaultValue)
        {
            int result;

            try
            {
                result = TransportAppConfig.GetConfigInt(label, minimumValue, maximumValue, defaultValue);
            }
            catch (ConfigurationErrorsException)
            {
                result = defaultValue;
            }
            return(result);
        }
コード例 #4
0
        private static bool GetConfigBool(string label, bool defaultValue)
        {
            bool result;

            try
            {
                result = TransportAppConfig.GetConfigBool(label, defaultValue);
            }
            catch (ConfigurationErrorsException)
            {
                result = defaultValue;
            }
            return(result);
        }
コード例 #5
0
        private static TimeSpan GetConfigTimeSpan(string label, TimeSpan min, TimeSpan max, TimeSpan defaultValue)
        {
            TimeSpan result;

            try
            {
                result = TransportAppConfig.GetConfigValue <TimeSpan>(label, min, max, defaultValue, new TransportAppConfig.TryParse <TimeSpan>(TimeSpan.TryParse));
            }
            catch (ConfigurationErrorsException)
            {
                result = defaultValue;
            }
            return(result);
        }
コード例 #6
0
        private static string GetConfigString(string label, string defaultValue)
        {
            string result;

            try
            {
                result = TransportAppConfig.GetConfigString(label, defaultValue);
            }
            catch (ConfigurationErrorsException)
            {
                result = defaultValue;
            }
            return(result);
        }
コード例 #7
0
        // Token: 0x060000DC RID: 220 RVA: 0x00006B30 File Offset: 0x00004D30
        public static TimeSpan GetConfigTimeSpan(string label, TimeSpan min, TimeSpan max, TimeSpan defaultValue)
        {
            TimeSpan result;

            try
            {
                result = TransportAppConfig.GetConfigTimeSpan(label, min, max, defaultValue);
            }
            catch (ConfigurationErrorsException ex)
            {
                LogSearchService.Logger.LogEvent(MSExchangeTransportLogSearchEventLogConstants.Tuple_ErrorReadingAppConfig, DateTime.UtcNow.Hour.ToString(CultureInfo.InvariantCulture), new object[]
                {
                    ex.ToString()
                });
                result = defaultValue;
            }
            return(result);
        }
コード例 #8
0
        // Token: 0x060000DB RID: 219 RVA: 0x00006AB8 File Offset: 0x00004CB8
        public static bool GetConfigBool(string label, bool defaultValue)
        {
            bool result;

            try
            {
                result = TransportAppConfig.GetConfigValue <bool>(label, defaultValue, new TransportAppConfig.TryParse <bool>(bool.TryParse));
            }
            catch (ConfigurationErrorsException ex)
            {
                LogSearchService.Logger.LogEvent(MSExchangeTransportLogSearchEventLogConstants.Tuple_ErrorReadingAppConfig, DateTime.UtcNow.Hour.ToString(CultureInfo.InvariantCulture), new object[]
                {
                    ex.ToString()
                });
                result = defaultValue;
            }
            return(result);
        }
コード例 #9
0
 private bool IsEnabled()
 {
     return(TransportAppConfig.GetConfigBool("InferenceClassificationAgentEnabledOverride", VariantConfiguration.InvariantNoFlightingSnapshot.MailboxTransport.InferenceClassificationAgent.Enabled));
 }
コード例 #10
0
 private bool ReadAgentEnabledValueFromConfigFile()
 {
     return(TransportAppConfig.GetConfigBool("PeopleIKnowAgentEnabled", true));
 }