Imported Upstream version 3.10.0

Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
Jo Shields
2014-10-04 11:27:48 +01:00
parent fe777c5c82
commit 8b9b85e7f5
970 changed files with 20242 additions and 31308 deletions

View File

@@ -769,28 +769,7 @@ namespace System.Configuration
internal class ElementMap
{
#if TARGET_JVM
const string elementMapsKey = "ElementMap_elementMaps";
static Hashtable elementMaps
{
get
{
Hashtable tbl = (Hashtable) AppDomain.CurrentDomain.GetData (elementMapsKey);
if (tbl == null) {
lock (typeof (ElementMap)) {
tbl = (Hashtable) AppDomain.CurrentDomain.GetData (elementMapsKey);
if (tbl == null) {
tbl = Hashtable.Synchronized (new Hashtable ());
AppDomain.CurrentDomain.SetData (elementMapsKey, tbl);
}
}
}
return tbl;
}
}
#else
static readonly Hashtable elementMaps = Hashtable.Synchronized (new Hashtable ());
#endif
readonly ConfigurationPropertyCollection properties;
readonly ConfigurationCollectionAttribute collectionAttribute;

View File

@@ -119,9 +119,6 @@ namespace System.Configuration {
return ConfigurationFactory.Create (typeof(ExeConfigurationHost), map, userLevel);
}
#if TARGET_JVM
[MonoLimitation ("Supported only when the userLevel parameter is set to ConfigurationUserLevel.None. Other values are not supported because Environment.GetFolderPath method is not implemented.")]
#endif
public static Configuration OpenExeConfiguration (ConfigurationUserLevel userLevel)
{
return OpenExeConfigurationInternal (userLevel, Assembly.GetEntryAssembly () ?? Assembly.GetCallingAssembly (), null);

View File

@@ -32,9 +32,7 @@
using System.Collections;
using System.Xml;
using System.IO;
#if !TARGET_JVM
using System.Security.Cryptography.Xml;
#endif
using System.Configuration.Internal;
namespace System.Configuration

View File

@@ -161,34 +161,24 @@ namespace System.Configuration
{
throw new NotImplementedException ();
}
#if !TARGET_JVM
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern private static string get_bundled_machine_config ();
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern private static string get_bundled_app_config ();
#endif
public virtual Stream OpenStreamForRead (string streamName)
{
if (String.CompareOrdinal (streamName, System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile) == 0) {
#if TARGET_JVM
return (Stream) vmw.common.IOUtils.getStreamForGHConfigs (streamName);
#else
string bundle = get_bundled_machine_config ();
if (bundle != null)
return new MemoryStream (System.Text.Encoding.UTF8.GetBytes (bundle));
#endif
}
if (String.CompareOrdinal (streamName, AppDomain.CurrentDomain.SetupInformation.ConfigurationFile) == 0) {
#if TARGET_JVM
throw new NotImplementedException();
#else
string bundle = get_bundled_app_config ();
if (bundle != null)
return new MemoryStream (System.Text.Encoding.UTF8.GetBytes (bundle));
#endif
}
if (!File.Exists (streamName))