Author: atsushi
Date: 2007-10-04 01:46:45 -0400 (Thu, 04 Oct 2007)
New Revision: 86847
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
trunk/mcs/class/System.Configuration/System.Configuration/Configuration.cs
trunk/mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.cs
Log:
2007-10-04 Atsushi Enomoto <[EMAIL PROTECTED]>
* InternalConfigurationHost.cs : when the streamName is for
machine.config, try get_bundled_machine_config() icall first.
This hopefully implements the requested feature in bug #325022.
* Configuration.cs : added comment.
Modified: trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2007-10-04 05:46:13 UTC (rev 86846)
+++ trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
2007-10-04 05:46:45 UTC (rev 86847)
@@ -1,3 +1,10 @@
+2007-10-04 Atsushi Enomoto <[EMAIL PROTECTED]>
+
+ * InternalConfigurationHost.cs : when the streamName is for
+ machine.config, try get_bundled_machine_config() icall first.
+ This hopefully implements the requested feature in bug #325022.
+ * Configuration.cs : added comment.
+
2007-08-31 Gert Driesen <[EMAIL PROTECTED]>
* ConfigurationManager.cs: Fixed line endings. Avoid warning by
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/Configuration.cs
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/Configuration.cs
2007-10-04 05:46:13 UTC (rev 86846)
+++ trunk/mcs/class/System.Configuration/System.Configuration/Configuration.cs
2007-10-04 05:46:45 UTC (rev 86847)
@@ -443,6 +443,8 @@
XmlTextReader reader = null;
Stream stream = null;
+ // FIXME: we should remove this kind of hack that
+ // hides the actual error
try {
stream = system.Host.OpenStreamForRead
(streamName);
} catch (Exception) {
Modified:
trunk/mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.cs
===================================================================
---
trunk/mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.cs
2007-10-04 05:46:13 UTC (rev 86846)
+++
trunk/mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.cs
2007-10-04 05:46:45 UTC (rev 86847)
@@ -32,6 +32,7 @@
using System.IO;
using System.Security;
using System.Configuration.Internal;
+using System.Runtime.CompilerServices;
namespace System.Configuration
{
@@ -163,12 +164,21 @@
throw new NotImplementedException ();
}
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ extern private static string get_bundled_machine_config ();
+
public virtual Stream OpenStreamForRead (string streamName)
{
+ if (String.CompareOrdinal (streamName,
System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile) ==
0) {
#if TARGET_JVM
- if (String.CompareOrdinal (streamName,
System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile) == 0)
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 (!File.Exists (streamName))
throw new ConfigurationException ("File '" +
streamName + "' not found");
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches