2007-05-02 Jonathan Chambers <joncham@gmail.com>
[mono.git] / mcs / class / corlib / System.Runtime.Remoting / RemotingConfiguration.cs
index a3390fdef41f4ec01f327ea03fbe93754b2c8ed1..108c1ec4ef11aad6231ecef8f1553118bc294acc 100644 (file)
@@ -98,20 +98,29 @@ namespace System.Runtime.Remoting
 
                // public methods
                
-               public static void Configure (string filename) 
+#if NET_2_0
+               [MonoTODO ("Implement ensureSecurity")]
+               public
+#else
+               internal
+#endif
+               static void Configure (string filename, bool ensureSecurity) 
                {
-                       lock (channelTemplates)
-                       {
-                               if (!defaultConfigRead)
-                               {
+                       lock (channelTemplates) {
+                               if (!defaultConfigRead) {
                                        ReadConfigFile (Environment.GetMachineConfigPath ());
                                        defaultConfigRead = true;
                                }
-                               
+
                                if (filename != null)
                                        ReadConfigFile (filename);
                        }
                }
+               
+               public static void Configure (string filename) 
+               {
+                       Configure (filename, false);
+               }
 
                private static void ReadConfigFile (string filename)
                {
@@ -578,8 +587,8 @@ namespace System.Runtime.Remoting
                        if (currentProviderData != null)
                        {
                                currentProviderData.Pop ();
-                               if (currentProviderData.Count > 0) return;
-                               currentProviderData = null;
+                               if (currentProviderData.Count == 0) 
+                                       currentProviderData = null;
                        }
                        
                        currentXmlPath = currentXmlPath.Substring (0, currentXmlPath.Length - name.Length - 1);