//
using System;
+using System.Globalization;
using System.IO;
using System.Reflection;
using System.Collections;
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;
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
{
// 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) {
ReadConfigFile (filename);
}
}
-#if NET_2_0
+
[Obsolete ("Use Configure(String,Boolean)")]
-#endif
public static void Configure (string filename)
{
Configure (filename, false);
}
}
- 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;
}
}
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;
}
}
}
}
- 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)
}
}
-#if NET_1_1
public static bool CustomErrorsEnabled (bool isLocalRequest)
{
if (_errorMode == "off") return false;
if (_errorMode == "on") return true;
return !isLocalRequest;
}
-#endif
internal static void SetCustomErrorsMode (string mode)
{
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) {}