static ServicePointManager() { #if !MONOTOUCH #if NET_2_0 && CONFIGURATION_DEP object cfg = ConfigurationManager.GetSection(configKey); ConnectionManagementSection s = cfg as ConnectionManagementSection; if (s != null) { manager = new ConnectionManagementData(null); foreach (ConnectionManagementElement e in s.ConnectionManagement) { manager.Add(e.Address, e.MaxConnection); } defaultConnectionLimit = (int)manager.GetMaxConnections("*"); return; } #endif manager = (ConnectionManagementData)ConfigurationSettings.GetConfig(configKey); if (manager != null) { defaultConnectionLimit = (int)manager.GetMaxConnections("*"); } #endif }
static ServicePointManager() { #if !MOBILE #if CONFIGURATION_DEP object cfg = ConfigurationManager.GetSection(configKey); ConnectionManagementSection s = cfg as ConnectionManagementSection; if (s != null) { manager = new ConnectionManagementData(null); foreach (ConnectionManagementElement e in s.ConnectionManagement) { manager.Add(e.Address, e.MaxConnection); } defaultConnectionLimit = (int)manager.GetMaxConnections("*"); return; } #endif #pragma warning disable 618 manager = (ConnectionManagementData)ConfigurationSettings.GetConfig(configKey); #pragma warning restore 618 if (manager != null) { defaultConnectionLimit = (int)manager.GetMaxConnections("*"); } #endif }
static ServicePointManager () { #if !NET_2_1 #if CONFIGURATION_DEP object cfg = ConfigurationManager.GetSection (configKey); ConnectionManagementSection s = cfg as ConnectionManagementSection; if (s != null) { manager = new ConnectionManagementData (null); foreach (ConnectionManagementElement e in s.ConnectionManagement) manager.Add (e.Address, e.MaxConnection); defaultConnectionLimit = (int) manager.GetMaxConnections ("*"); return; } #endif manager = (ConnectionManagementData) ConfigurationSettings.GetConfig (configKey); if (manager != null) { defaultConnectionLimit = (int) manager.GetMaxConnections ("*"); } #endif }