diff options
author | Gert Driesen <drieseng@users.sourceforge.net> | 2008-08-09 19:57:49 +0400 |
---|---|---|
committer | Gert Driesen <drieseng@users.sourceforge.net> | 2008-08-09 19:57:49 +0400 |
commit | 0d2dae8b4d8d5faeeec86b1013cb88176956fc75 (patch) | |
tree | 176730bd32e51a71568529e5a64568a7f9706885 /mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc | |
parent | 93fd1be79c53112775447ced508be2afc346bed9 (diff) |
Revert part of r110042.
svn path=/trunk/mcs/; revision=110045
Diffstat (limited to 'mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc')
4 files changed, 219 insertions, 225 deletions
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/ChangeLog b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/ChangeLog index a1126630d63..30dee038ce4 100644 --- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/ChangeLog +++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/ChangeLog @@ -1,12 +1,3 @@ -2008-08-09 Gert Driesen <drieseng@users.sourceforge.net> - - * IpcChannel.cs: Fixed argument names to match MS. Changed spaces to - tabs. - * IpcClientChannel.cs: Fixed argument names to match MS. Changed spaces - to tabs. - * IpcServerChannel.cs: Fixed argument names to match MS. Changed spaces - to tabs. - 2005-11-05 Robert Jordan <robertj@gmx.net> * IpcServerChannel.cs: Implemented missing GetChannelUri (). diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcChannel.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcChannel.cs index b4ab2c283d2..fdb89127181 100644 --- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcChannel.cs +++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcChannel.cs @@ -33,93 +33,92 @@ using System.Collections; using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging;
-using Unix = System.Runtime.Remoting.Channels.Ipc.Unix;
+using Unix = System.Runtime.Remoting.Channels.Ipc.Unix;
using Win32 = System.Runtime.Remoting.Channels.Ipc.Win32;
namespace System.Runtime.Remoting.Channels.Ipc
{
- public class IpcChannel : IChannelReceiver, IChannelSender, IChannel
- {
- readonly IChannel _innerChannel;
-
- internal static bool IsUnix
- {
- get
- {
-#if NET_2_0
- return Environment.OSVersion.Platform == PlatformID.Unix;
-#else
- return (int) Environment.OSVersion.Platform == 128;
-#endif
- }
- }
-
- public IpcChannel ()
- {
- if (IsUnix)
- _innerChannel = new Unix.IpcChannel ();
- else
- _innerChannel = new Win32.IpcChannel ();
- }
-
- public IpcChannel (string portName)
- {
- if (IsUnix)
- _innerChannel = new Unix.IpcChannel (portName);
- else
- _innerChannel = new Win32.IpcChannel (portName);
- }
-
- public IpcChannel (IDictionary properties,
- IClientChannelSinkProvider clientSinkProvider,
- IServerChannelSinkProvider serverSinkProvider)
- {
- if (IsUnix)
- _innerChannel = new Unix.IpcChannel (properties, clientSinkProvider, serverSinkProvider);
- else
- _innerChannel = new Win32.IpcChannel (properties, clientSinkProvider, serverSinkProvider);
- }
-
- public string ChannelName {
- get { return _innerChannel.ChannelName; }
- }
-
- public int ChannelPriority {
- get { return _innerChannel.ChannelPriority; }
- }
-
- public string Parse (string url, out string objectURI)
- {
- return _innerChannel.Parse (url, out objectURI);
- }
-
- public IMessageSink CreateMessageSink (string url,
- object remoteChannelData,
- out string objectURI)
- {
- return ((IChannelSender) _innerChannel).CreateMessageSink (
- url, remoteChannelData, out objectURI);
- }
-
- public object ChannelData {
- get { return ((IChannelReceiver) _innerChannel).ChannelData; }
- }
-
- public string [] GetUrlsForUri (string objectURI)
- {
- return ((IChannelReceiver) _innerChannel).GetUrlsForUri (objectURI);
- }
-
- public void StartListening (object data)
- {
- ((IChannelReceiver) _innerChannel).StartListening (data);
- }
-
- public void StopListening (object data)
- {
- ((IChannelReceiver) _innerChannel).StopListening (data);
- }
- }
+ public class IpcChannel : IChannelReceiver, IChannelSender, IChannel
+ {
+ IChannel _innerChannel;
+
+ internal static bool IsUnix
+ {
+ get {
+ int p = (int) Environment.OSVersion.Platform;
+ return ((p == 4) || (p == 128));
+ }
+ }
+
+ public IpcChannel ()
+ {
+ if (IsUnix)
+ _innerChannel = new Unix.IpcChannel ();
+ else
+ _innerChannel = new Win32.IpcChannel ();
+ }
+
+ public IpcChannel (string portName)
+ {
+ if (IsUnix)
+ _innerChannel = new Unix.IpcChannel (portName);
+ else
+ _innerChannel = new Win32.IpcChannel (portName);
+ }
+
+ public IpcChannel (IDictionary properties,
+ IClientChannelSinkProvider clientSinkProvider,
+ IServerChannelSinkProvider serverSinkProvider)
+ {
+ if (IsUnix)
+ _innerChannel = new Unix.IpcChannel (properties, clientSinkProvider, serverSinkProvider);
+ else
+ _innerChannel = new Win32.IpcChannel (properties, clientSinkProvider, serverSinkProvider);
+ }
+
+ public string ChannelName
+ {
+ get { return _innerChannel.ChannelName; }
+ }
+
+ public int ChannelPriority
+ {
+ get { return _innerChannel.ChannelPriority; }
+ }
+
+ public string Parse (string url, out string objectUri)
+ {
+ return _innerChannel.Parse (url, out objectUri);
+ }
+
+ public IMessageSink CreateMessageSink (string url,
+ object remoteChannelData,
+ out string objectUri)
+ {
+ return ((IChannelSender)_innerChannel).CreateMessageSink (url, remoteChannelData, out objectUri);
+ }
+
+ public object ChannelData
+ {
+ get { return ((IChannelReceiver)_innerChannel).ChannelData; }
+ }
+
+ public string[] GetUrlsForUri (string objectUri)
+ {
+ return ((IChannelReceiver)_innerChannel).GetUrlsForUri (objectUri);
+ }
+
+ public void StartListening (object data)
+ {
+ ((IChannelReceiver)_innerChannel).StartListening (data);
+ }
+
+ public void StopListening (object data)
+ {
+ ((IChannelReceiver)_innerChannel).StopListening (data);
+ }
+
+ }
}
#endif
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.cs index 2a9606fc8b9..9a6a61049cd 100644 --- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.cs +++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.cs @@ -33,62 +33,63 @@ using System.Collections; using System.Runtime.Remoting;
using System.Runtime.Remoting.Messaging;
-using Unix = System.Runtime.Remoting.Channels.Ipc.Unix;
+using Unix = System.Runtime.Remoting.Channels.Ipc.Unix;
using Win32 = System.Runtime.Remoting.Channels.Ipc.Win32;
namespace System.Runtime.Remoting.Channels.Ipc
{
- public class IpcClientChannel : IChannelSender, IChannel
- {
- readonly IChannelSender _innerChannel;
+ public class IpcClientChannel : IChannelSender, IChannel
+ {
+ IChannelSender _innerChannel;
- public IpcClientChannel ()
- {
- if (IpcChannel.IsUnix)
- _innerChannel = new Unix.IpcClientChannel ();
- else
- _innerChannel = new Win32.IpcClientChannel ();
- }
+ public IpcClientChannel ()
+ {
+ if (IpcChannel.IsUnix)
+ _innerChannel = new Unix.IpcClientChannel ();
+ else
+ _innerChannel = new Win32.IpcClientChannel ();
+ }
- public IpcClientChannel (IDictionary properties,
- IClientChannelSinkProvider sinkProvider)
- {
- if (IpcChannel.IsUnix)
- _innerChannel = new Unix.IpcClientChannel (properties, sinkProvider);
- else
- _innerChannel = new Win32.IpcClientChannel (properties, sinkProvider);
- }
+ public IpcClientChannel (IDictionary properties,
+ IClientChannelSinkProvider sinkProvider)
+ {
+ if (IpcChannel.IsUnix)
+ _innerChannel = new Unix.IpcClientChannel (properties, sinkProvider);
+ else
+ _innerChannel = new Win32.IpcClientChannel (properties, sinkProvider);
+ }
- public IpcClientChannel (string name,
- IClientChannelSinkProvider sinkProvider)
- {
- if (IpcChannel.IsUnix)
- _innerChannel = new Unix.IpcClientChannel (name, sinkProvider);
- else
- _innerChannel = new Win32.IpcClientChannel (name, sinkProvider);
- }
+ public IpcClientChannel (string name,
+ IClientChannelSinkProvider sinkProvider)
+ {
+ if (IpcChannel.IsUnix)
+ _innerChannel = new Unix.IpcClientChannel (name, sinkProvider);
+ else
+ _innerChannel = new Win32.IpcClientChannel (name, sinkProvider);
+ }
- public string ChannelName {
- get { return ((IChannel) _innerChannel).ChannelName; }
- }
+ public string ChannelName
+ {
+ get { return ((IChannel)_innerChannel).ChannelName; }
+ }
- public int ChannelPriority {
- get { return ((IChannel) _innerChannel).ChannelPriority; }
- }
+ public int ChannelPriority
+ {
+ get { return ((IChannel)_innerChannel).ChannelPriority; }
+ }
- public string Parse (string url, out string objectURI)
- {
- return ((IChannel) _innerChannel).Parse (url, out objectURI);
- }
+ public string Parse (string url, out string objectUri)
+ {
+ return ((IChannel)_innerChannel).Parse (url, out objectUri);
+ }
- public virtual IMessageSink CreateMessageSink (string url,
- object remoteChannelData,
- out string objectURI)
- {
- return _innerChannel.CreateMessageSink (url,
- remoteChannelData, out objectURI);
- }
- }
+ public IMessageSink CreateMessageSink (string url,
+ object remoteChannelData,
+ out string objectUri)
+ {
+ return _innerChannel.CreateMessageSink (url, remoteChannelData, out objectUri);
+ }
+ }
}
#endif
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.cs index 00cf6d7a5a3..8090f70790a 100644 --- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.cs +++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.cs @@ -32,98 +32,101 @@ using System; using System.Collections;
using System.Runtime.Remoting;
-using Unix = System.Runtime.Remoting.Channels.Ipc.Unix;
+using Unix = System.Runtime.Remoting.Channels.Ipc.Unix;
using Win32 = System.Runtime.Remoting.Channels.Ipc.Win32;
namespace System.Runtime.Remoting.Channels.Ipc
{
- public class IpcServerChannel : IChannelReceiver, IChannel
- {
- readonly IChannelReceiver _innerChannel;
- readonly string _portName;
-
- public IpcServerChannel (string portName)
- {
- _portName = portName;
-
- if (IpcChannel.IsUnix)
- _innerChannel = new Unix.IpcServerChannel (portName);
- else
- _innerChannel = new Win32.IpcServerChannel (portName);
- }
-
- public IpcServerChannel (IDictionary properties,
- IServerChannelSinkProvider sinkProvider)
- {
- if (properties != null)
- _portName = properties ["portName"] as string;
-
- if (IpcChannel.IsUnix)
- _innerChannel = new Unix.IpcServerChannel (properties, sinkProvider);
- else
- _innerChannel = new Win32.IpcServerChannel (properties, sinkProvider);
- }
-
- public IpcServerChannel (string name, string portName,
- IServerChannelSinkProvider sinkProvider)
- {
- _portName = portName;
-
- if (IpcChannel.IsUnix)
- _innerChannel = new Unix.IpcServerChannel (name, portName, sinkProvider);
- else
- _innerChannel = new Win32.IpcServerChannel (name, portName, sinkProvider);
- }
-
- public IpcServerChannel (string name, string portName)
- {
- _portName = portName;
-
- if (IpcChannel.IsUnix)
- _innerChannel = new Unix.IpcServerChannel (name, portName);
- else
- _innerChannel = new Win32.IpcServerChannel (name, portName);
- }
-
- public string ChannelName {
- get { return ((IChannel) _innerChannel).ChannelName; }
- }
-
- public int ChannelPriority {
- get { return ((IChannel) _innerChannel).ChannelPriority; }
- }
-
- public string Parse (string url, out string objectURI)
- {
- return ((IChannel) _innerChannel).Parse (url, out objectURI);
- }
-
- public object ChannelData {
- get { return _innerChannel.ChannelData; }
- }
-
- public virtual string [] GetUrlsForUri (string objectUri)
- {
- return _innerChannel.GetUrlsForUri (objectUri);
- }
-
- public void StartListening (object data)
- {
- _innerChannel.StartListening (data);
- }
-
- public void StopListening (object data)
- {
- _innerChannel.StopListening (data);
- }
-
- public string GetChannelUri ()
- {
- // There is no interface for this member,
- // so we cannot delegate to the inner channel.
- return Win32.IpcChannelHelper.SchemeStart + _portName;
- }
- }
+ public class IpcServerChannel : IChannelReceiver, IChannel
+ {
+ IChannelReceiver _innerChannel;
+ string _portName;
+
+ public IpcServerChannel (string portName)
+ {
+ _portName = portName;
+
+ if (IpcChannel.IsUnix)
+ _innerChannel = new Unix.IpcServerChannel (portName);
+ else
+ _innerChannel = new Win32.IpcServerChannel (portName);
+ }
+
+ public IpcServerChannel (IDictionary properties,
+ IServerChannelSinkProvider serverSinkProvider)
+ {
+ if (properties != null)
+ _portName = properties ["portName"] as string;
+
+ if (IpcChannel.IsUnix)
+ _innerChannel = new Unix.IpcServerChannel (properties, serverSinkProvider);
+ else
+ _innerChannel = new Win32.IpcServerChannel (properties, serverSinkProvider);
+ }
+
+ public IpcServerChannel (string name, string portName,
+ IServerChannelSinkProvider serverSinkProvider)
+ {
+ _portName = portName;
+
+ if (IpcChannel.IsUnix)
+ _innerChannel = new Unix.IpcServerChannel (name, portName, serverSinkProvider);
+ else
+ _innerChannel = new Win32.IpcServerChannel (name, portName, serverSinkProvider);
+ }
+
+ public IpcServerChannel (string name, string portName)
+ {
+ _portName = portName;
+
+ if (IpcChannel.IsUnix)
+ _innerChannel = new Unix.IpcServerChannel (name, portName);
+ else
+ _innerChannel = new Win32.IpcServerChannel (name, portName);
+ }
+
+ public string ChannelName
+ {
+ get { return ((IChannel)_innerChannel).ChannelName; }
+ }
+
+ public int ChannelPriority
+ {
+ get { return ((IChannel)_innerChannel).ChannelPriority; }
+ }
+
+ public string Parse (string url, out string objectUri)
+ {
+ return ((IChannel)_innerChannel).Parse (url, out objectUri);
+ }
+
+ public object ChannelData
+ {
+ get { return _innerChannel.ChannelData; }
+ }
+
+ public string[] GetUrlsForUri (string objectUri)
+ {
+ return _innerChannel.GetUrlsForUri (objectUri);
+ }
+
+ public void StartListening (object data)
+ {
+ _innerChannel.StartListening (data);
+ }
+
+ public void StopListening (object data)
+ {
+ _innerChannel.StopListening (data);
+ }
+
+ public string GetChannelUri ()
+ {
+ // There is no interface for this member,
+ // so we cannot delegate to the inner channel.
+ return Win32.IpcChannelHelper.SchemeStart + _portName;
+ }
+ }
}
#endif
|