Imported Upstream version 3.12.0

Former-commit-id: cf92446697332992ec36726e78eb8703e1f259d7
This commit is contained in:
Jo Shields
2015-01-13 10:44:36 +00:00
parent 8b9b85e7f5
commit 181b81b4a4
659 changed files with 12743 additions and 16300 deletions

View File

@ -67,6 +67,7 @@ namespace System.Web.Configuration {
static readonly char[] pathTrimChars = { '/' };
static readonly object suppressAppReloadLock = new object ();
static readonly object saveLocationsCacheLock = new object ();
static readonly object getSectionLock = new object ();
// See comment for the cacheLock field at top of System.Web.Caching/Cache.cs
static readonly ReaderWriterLockSlim sectionCacheLock;
@ -517,7 +518,10 @@ namespace System.Web.Configuration {
cachePath = path;
}
ConfigurationSection section = c.GetSection (sectionName);
ConfigurationSection section;
lock (getSectionLock) {
section = c.GetSection (sectionName);
}
if (section == null)
return null;
@ -529,7 +533,7 @@ namespace System.Web.Configuration {
value = collection;
}
#else
object value = SettingsMappingManager.MapSection (get_runtime_object.Invoke (section, new object [0]));
object value = SettingsMappingManager.MapSection (section.GetRuntimeObject ());
#endif
if (cachePath != null)
cacheKey = baseCacheKey ^ cachePath.GetHashCode ();
@ -677,7 +681,9 @@ namespace System.Web.Configuration {
configurations.Remove (GetCurrentPath (ctx));
}
#if TARGET_J2EE
readonly static MethodInfo get_runtime_object = typeof (ConfigurationSection).GetMethod ("GetRuntimeObject", BindingFlags.NonPublic | BindingFlags.Instance);
#endif
public static object GetWebApplicationSection (string sectionName)
{