Author: igorz
Date: 2007-05-17 10:25:45 -0400 (Thu, 17 May 2007)
New Revision: 77564

Modified:
   trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
   trunk/mcs/class/System.Configuration/System.Configuration/Configuration.cs
Log:
2007-05-17 Igor Zelmanovich <[EMAIL PROTECTED]>

        * Configuration.cs: FilePath implemented according to MSDN:
        If the value for this FilePath property represents a merged view and 
        no actual file exists for the application, the path to the parent 
        configuration file is returned.



Modified: trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog 
2007-05-17 14:23:33 UTC (rev 77563)
+++ trunk/mcs/class/System.Configuration/System.Configuration/ChangeLog 
2007-05-17 14:25:45 UTC (rev 77564)
@@ -1,3 +1,10 @@
+2007-05-17 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+       * Configuration.cs: FilePath implemented according to MSDN:
+       If the value for this FilePath property represents a merged view and 
+       no actual file exists for the application, the path to the parent 
+       configuration file is returned.
+
 2007-05-15 Igor Zelmanovich <[EMAIL PROTECTED]>
 
        * Configuration.cs:

Modified: 
trunk/mcs/class/System.Configuration/System.Configuration/Configuration.cs
===================================================================
--- trunk/mcs/class/System.Configuration/System.Configuration/Configuration.cs  
2007-05-17 14:23:33 UTC (rev 77563)
+++ trunk/mcs/class/System.Configuration/System.Configuration/Configuration.cs  
2007-05-17 14:25:45 UTC (rev 77564)
@@ -167,8 +167,15 @@
                        get { return (ConnectionStringsSection) GetSection 
("connectionStrings"); }
                }
 
+               // MSDN: If the value for this FilePath property represents a 
merged view and 
+               // no actual file exists for the application, the path to the 
parent configuration 
+               // file is returned.
                public string FilePath {
-                       get { return streamName; }
+                       get {
+                               if (streamName == null && parent != null)
+                                       return parent.FilePath;
+                               return streamName;
+                       }
                }
 
                public bool HasFile {

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to