Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -34,6 +34,9 @@ namespace System.Configuration
None = 0,
IsDefaultCollection = 1,
IsRequired = 2,
IsKey = 4
IsKey = 4,
IsTypeStringTransformationRequired = 8,
IsAssemblyStringTransformationRequired = 16,
IsVersionCheckRequired = 32
}
}

View File

@@ -39,7 +39,8 @@ namespace System.Configuration
{
SectionGroupInfo group;
Configuration config;
static readonly object lockObject = new object();
internal ConfigurationSectionCollection (Configuration config, SectionGroupInfo group)
: base (StringComparer.Ordinal)
{
@@ -60,15 +61,17 @@ namespace System.Configuration
public ConfigurationSection this [string name]
{
get {
ConfigurationSection sec = BaseGet (name) as ConfigurationSection;
if (sec == null) {
SectionInfo secData = group.Sections [name] as SectionInfo;
if (secData == null) return null;
sec = config.GetSectionInstance (secData, true);
if (sec == null) return null;
BaseSet (name, sec);
lock(lockObject) {
ConfigurationSection sec = BaseGet (name) as ConfigurationSection;
if (sec == null) {
SectionInfo secData = group.Sections [name] as SectionInfo;
if (secData == null) return null;
sec = config.GetSectionInstance (secData, true);
if (sec == null) return null;
BaseSet (name, sec);
}
return sec;
}
return sec;
}
}