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

@ -56,10 +56,8 @@ using System.Runtime.InteropServices;
[assembly: ComVisible (false)]
[assembly: AllowPartiallyTrustedCallers]
#if !TARGET_JVM //TARGET_JVM does not support signing
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../msfinal.pub")]
#endif
[assembly: InternalsVisibleTo ("System.Web, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]

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))

View File

@ -429,11 +429,9 @@ namespace MonoTests.System.Configuration {
{
SysConfig cfg = ConfigurationManager.OpenMachineConfiguration ();
Assert.IsTrue (cfg.Sections.Count > 0, "#1");
#if !TARGET_JVM
ConfigurationSection s = cfg.SectionGroups ["system.net"].Sections ["connectionManagement"];
Assert.IsNotNull (s, "#2");
Assert.IsTrue (s is ConnectionManagementSection, "#3");
#endif
}
[Test]

View File

@ -71,7 +71,6 @@ namespace MonoTests.System.Configuration {
Assert.IsNull (p3, "A1");
}
#if !TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Intersect_wrongtype ()
@ -80,7 +79,6 @@ namespace MonoTests.System.Configuration {
IPermission p3 = p1.Intersect (new StrongNameIdentityPermission (PermissionState.Unrestricted));
}
#endif
[Test]
public void Union ()
@ -107,7 +105,6 @@ namespace MonoTests.System.Configuration {
Assert.IsTrue (((ConfigurationPermission)p3).IsUnrestricted(), "A2");
}
#if !TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Union_wrongtypee ()
@ -116,7 +113,6 @@ namespace MonoTests.System.Configuration {
IPermission p3 = p1.Union (new StrongNameIdentityPermission (PermissionState.Unrestricted));
}
#endif
[Test]
public void Subset ()
@ -133,7 +129,6 @@ namespace MonoTests.System.Configuration {
Assert.IsTrue (p2.IsSubsetOf (null), "A6");
}
#if !TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Subset_wrongtype ()
@ -142,12 +137,8 @@ namespace MonoTests.System.Configuration {
Assert.IsFalse (p1.IsSubsetOf (new StrongNameIdentityPermission (PermissionState.Unrestricted)));
}
#endif
[Test]
#if TARGET_JVM
[Category("NotWorking")]
#endif
public void ToXml ()
{
ConfigurationPermission p = new ConfigurationPermission (PermissionState.Unrestricted);

View File

@ -85,13 +85,9 @@ namespace MonoTests.System.Configuration.Util {
public static string ThisConfigFileName {
get {
#if TARGET_JVM
return "System.Configuration.Test20.jar.config";
#else
var asm = Assembly.GetCallingAssembly ();
var exe = Path.GetFileName (asm.Location);
return exe + ".config";
#endif
}
}
}