You've already forked linux-packaging-mono
Imported Upstream version 3.10.0
Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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
|
||||
|
@@ -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))
|
||||
|
Reference in New Issue
Block a user