X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Runtime.Remoting%2FRemotingConfiguration.cs;h=46e71422e04baf501f3327fe6cfa3d393355a068;hb=68069f056621ebdafa21ae4e75e75f6e83b7202a;hp=8236e22605b4ab62cbcae0be109d14449f6a575d;hpb=c7166273ee53fb2f1751e6714fb60b66aa579e2d;p=mono.git diff --git a/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs b/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs index 8236e22605b..46e71422e04 100644 --- a/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs +++ b/mcs/class/corlib/System.Runtime.Remoting/RemotingConfiguration.cs @@ -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); @@ -211,19 +192,19 @@ namespace System.Runtime.Remoting } } - public static bool IsActivationAllowed (Type serverType) + public static bool IsActivationAllowed (Type svrType) { lock (channelTemplates) { - return activatedServiceEntries.ContainsKey (serverType); + return activatedServiceEntries.ContainsKey (svrType); } } - public static ActivatedClientTypeEntry IsRemotelyActivatedClientType (Type serviceType) + public static ActivatedClientTypeEntry IsRemotelyActivatedClientType (Type svrType) { lock (channelTemplates) { - return activatedClientEntries [serviceType] as ActivatedClientTypeEntry; + return activatedClientEntries [svrType] as ActivatedClientTypeEntry; } } @@ -232,11 +213,11 @@ namespace System.Runtime.Remoting return IsRemotelyActivatedClientType (Assembly.Load(assemblyName).GetType (typeName)); } - public static WellKnownClientTypeEntry IsWellKnownClientType (Type serviceType) + public static WellKnownClientTypeEntry IsWellKnownClientType (Type svrType) { lock (channelTemplates) { - return wellKnownClientEntries [serviceType] as WellKnownClientTypeEntry; + return wellKnownClientEntries [svrType] as WellKnownClientTypeEntry; } } @@ -298,9 +279,9 @@ namespace System.Runtime.Remoting } } - public static void RegisterWellKnownServiceType (Type type, string objectUrl, WellKnownObjectMode mode) + public static void RegisterWellKnownServiceType (Type type, string objectUri, WellKnownObjectMode mode) { - RegisterWellKnownServiceType (new WellKnownServiceTypeEntry (type, objectUrl, mode)); + RegisterWellKnownServiceType (new WellKnownServiceTypeEntry (type, objectUri, mode)); } public static void RegisterWellKnownServiceType (WellKnownServiceTypeEntry entry) @@ -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) {}