Merge pull request #297 from ermshiperete/4959
[mono.git] / mcs / class / corlib / System.Runtime.Remoting / RemotingConfiguration.cs
index ff08e1a2c245bfa2d1236bc10486aa7087bca12f..46e71422e04baf501f3327fe6cfa3d393355a068 100644 (file)
@@ -31,6 +31,7 @@
 //
 
 using System;
+using System.Globalization;
 using System.IO;
 using System.Reflection;
 using System.Collections;
@@ -41,26 +42,14 @@ using Mono.Xml;
 
 namespace System.Runtime.Remoting
 {      
-#if NET_2_0
        [System.Runtime.InteropServices.ComVisible (true)]
        public static class RemotingConfiguration
-#else
-       public class RemotingConfiguration
-#endif
        {
-#if !NET_2_0
-               //
-               // Private constructor: nobody instantiates this.
-               //
-               private RemotingConfiguration ()
-               {
-               }
-#endif
                
                static string applicationID = null;
                static string applicationName = null;
-               static string configFile = "";
-               static SmallXmlParser parser = null; 
+//             static string configFile = "";
+//             static SmallXmlParser parser = null; 
                static string processGuid = null;
                static bool defaultConfigRead = false;
                static bool defaultDelayedConfigRead = false;
@@ -92,14 +81,12 @@ namespace System.Runtime.Remoting
                        set { applicationName = value; }
                }
 
-#if NET_2_0
                [MonoTODO]
                public static CustomErrorsModes CustomErrorsMode
                {
                        get { throw new NotImplementedException (); }
                        set { throw new NotImplementedException (); }
                }
-#endif
 
                public static string ProcessId 
                {
@@ -114,13 +101,8 @@ namespace System.Runtime.Remoting
 
                // public methods
                
-#if NET_2_0
-               [MonoTODO ("Implement ensureSecurity")]
-               public
-#else
-               internal
-#endif
-               static void Configure (string filename, bool ensureSecurity) 
+               [MonoTODO ("ensureSecurity support has not been implemented")]
+               public static void Configure (string filename, bool ensureSecurity) 
                {
                        lock (channelTemplates) {
                                if (!defaultConfigRead) {
@@ -132,9 +114,8 @@ namespace System.Runtime.Remoting
                                        ReadConfigFile (filename);
                        }
                }
-#if NET_2_0
+
                [Obsolete ("Use Configure(String,Boolean)")]
-#endif
                public static void Configure (string filename) 
                {
                        Configure (filename, false);
@@ -440,10 +421,11 @@ namespace System.Runtime.Remoting
                
                bool CheckPath (string path)
                {
-                       if (path.StartsWith ("/"))
+                       CompareInfo ci = CultureInfo.InvariantCulture.CompareInfo;
+                       if (ci.IsPrefix (path, "/", CompareOptions.Ordinal))
                                return path == currentXmlPath;
                        else
-                               return currentXmlPath.EndsWith (path);
+                               return ci.IsSuffix (currentXmlPath, path, CompareOptions.Ordinal);
                }
                
                public void OnStartParsing (SmallXmlParser parser) {}