2009-05-26 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Tue, 26 May 2009 07:55:32 +0000 (07:55 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Tue, 26 May 2009 07:55:32 +0000 (07:55 -0000)
* DuplexSessionChannelBase.cs, DuplexChannelBase.cs:
  rename from former to latter.

* System.ServiceModel.dll.sources: cosmetic file renaming.

svn path=/trunk/mcs/; revision=134743

mcs/class/System.ServiceModel/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexChannelBase.cs [new file with mode: 0644]
mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexSessionChannelBase.cs [deleted file]
mcs/class/System.ServiceModel/System.ServiceModel.dll.sources

index cffe385c003c3d2770b84a5e8216448458f0f0ea..88386917a2b1a512aac3cb10cdba97540a7fe348 100755 (executable)
@@ -1,3 +1,7 @@
+2009-05-26  Astushi Enomoto  <atsushi@ximian.com>
+
+       * System.ServiceModel.dll.sources: cosmetic file renaming.
+
 2009-05-25  Astushi Enomoto  <atsushi@ximian.com>
 
        * System.ServiceModel.dll_test.sources:
index 6f88b2244dce7a6cc965092a36f12f1b69a4b8ba..3c9b3bf46adb542d6d38256dbea3f2806817b076 100755 (executable)
@@ -1,3 +1,8 @@
+2009-05-26  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * DuplexSessionChannelBase.cs, DuplexChannelBase.cs:
+         rename from former to latter.
+
 2009-05-25  Atsushi Enomoto  <atsushi@ximian.com>
 
        * TcpDuplexSessionChannel.cs : reader does not always return full
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexChannelBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexChannelBase.cs
new file mode 100644 (file)
index 0000000..07db03f
--- /dev/null
@@ -0,0 +1,159 @@
+// 
+// DuplexSessionChannelBase.cs
+// 
+// Author:
+//     Marcos Cobena (marcoscobena@gmail.com)
+//     Atsushi Enomoto  <atsushi@ximian.com>
+// 
+// Copyright 2007 Marcos Cobena (http://www.youcannoteatbits.org/)
+// 
+// Copyright (C) 2009 Novell, Inc.  http://www.novell.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.ServiceModel.Channels;
+
+namespace System.ServiceModel.Channels
+{
+       internal abstract class DuplexChannelBase : ChannelBase, IDuplexChannel
+       {
+               ChannelFactoryBase channel_factory_base;
+               ChannelListenerBase channel_listener_base;
+               EndpointAddress local_address;
+               EndpointAddress remote_address;
+               Uri via;
+               
+               public DuplexChannelBase (ChannelFactoryBase factory, EndpointAddress remoteAddress, Uri via) : base (factory)
+               {
+                       channel_factory_base = factory;
+                       remote_address = remoteAddress;
+                       this.via = via;
+                       SetupDelegates ();
+               }
+               
+               public DuplexChannelBase (ChannelListenerBase listener) : base (listener)
+               {
+                       channel_listener_base = listener;
+                       SetupDelegates ();
+               }
+
+               public abstract EndpointAddress LocalAddress { get; }
+               
+               public EndpointAddress RemoteAddress {
+                       get { return remote_address; }
+               }
+
+               public Uri Via {
+                       get { return via; }
+               }
+
+               void SetupDelegates ()
+               {
+                       send_handler = new AsyncSendHandler (Send);
+                       receive_handler = new AsyncReceiveHandler (Receive);
+                       wait_handler = new AsyncWaitForMessageHandler (WaitForMessage);
+               }
+
+               // Send
+
+               delegate void AsyncSendHandler (Message message, TimeSpan timeout);
+               AsyncSendHandler send_handler;
+
+               public virtual IAsyncResult BeginSend (Message message, AsyncCallback callback, object state)
+               {
+                       return BeginSend (message, DefaultSendTimeout, callback, state);
+               }
+
+               public virtual IAsyncResult BeginSend (Message message, TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return send_handler.BeginInvoke (message, timeout, callback, state);
+               }
+
+               public virtual void EndSend (IAsyncResult result)
+               {
+                       send_handler.EndInvoke (result);
+               }
+
+               public virtual void Send (Message message)
+               {
+                       Send (message, this.DefaultSendTimeout);
+               }
+
+               public abstract void Send (Message message, TimeSpan timeout);
+
+               // Receive
+
+               delegate Message AsyncReceiveHandler (TimeSpan timeout);
+               AsyncReceiveHandler receive_handler;
+
+               public virtual IAsyncResult BeginReceive (AsyncCallback callback, object state)
+               {
+                       return BeginReceive (this.DefaultReceiveTimeout, callback, state);
+               }
+
+               public virtual IAsyncResult BeginReceive (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return receive_handler.BeginInvoke (timeout, callback, state);
+               }
+
+               public virtual Message EndReceive (IAsyncResult result)
+               {
+                       return receive_handler.EndInvoke (result);
+               }
+
+               public virtual Message Receive ()
+               {
+                       return Receive (this.DefaultReceiveTimeout);
+               }
+
+               public abstract Message Receive (TimeSpan timeout);
+
+               // TryReceive
+               // FIXME: apply those "async to call sync" pattern too (but how?)
+
+               public abstract IAsyncResult BeginTryReceive (TimeSpan timeout, AsyncCallback callback, object state);
+               
+               public abstract bool EndTryReceive (IAsyncResult result, out Message message);
+               
+               public virtual bool TryReceive (TimeSpan timeout, out Message message)
+               {
+                       return EndTryReceive (BeginTryReceive (timeout, null, null), out message);
+               }
+
+               // WaitForMessage
+
+               delegate bool AsyncWaitForMessageHandler (TimeSpan timeout);
+               AsyncWaitForMessageHandler wait_handler;
+
+               public virtual IAsyncResult BeginWaitForMessage (TimeSpan timeout, AsyncCallback callback, object state)
+               {
+                       return wait_handler.BeginInvoke (timeout, callback, state);
+               }
+               
+               public virtual bool EndWaitForMessage (IAsyncResult result)
+               {
+                       return wait_handler.EndInvoke (result);
+               }
+               
+               public abstract bool WaitForMessage (TimeSpan timeout);
+       }
+}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexSessionChannelBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/DuplexSessionChannelBase.cs
deleted file mode 100644 (file)
index 07db03f..0000000
+++ /dev/null
@@ -1,159 +0,0 @@
-// 
-// DuplexSessionChannelBase.cs
-// 
-// Author:
-//     Marcos Cobena (marcoscobena@gmail.com)
-//     Atsushi Enomoto  <atsushi@ximian.com>
-// 
-// Copyright 2007 Marcos Cobena (http://www.youcannoteatbits.org/)
-// 
-// Copyright (C) 2009 Novell, Inc.  http://www.novell.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.ServiceModel.Channels;
-
-namespace System.ServiceModel.Channels
-{
-       internal abstract class DuplexChannelBase : ChannelBase, IDuplexChannel
-       {
-               ChannelFactoryBase channel_factory_base;
-               ChannelListenerBase channel_listener_base;
-               EndpointAddress local_address;
-               EndpointAddress remote_address;
-               Uri via;
-               
-               public DuplexChannelBase (ChannelFactoryBase factory, EndpointAddress remoteAddress, Uri via) : base (factory)
-               {
-                       channel_factory_base = factory;
-                       remote_address = remoteAddress;
-                       this.via = via;
-                       SetupDelegates ();
-               }
-               
-               public DuplexChannelBase (ChannelListenerBase listener) : base (listener)
-               {
-                       channel_listener_base = listener;
-                       SetupDelegates ();
-               }
-
-               public abstract EndpointAddress LocalAddress { get; }
-               
-               public EndpointAddress RemoteAddress {
-                       get { return remote_address; }
-               }
-
-               public Uri Via {
-                       get { return via; }
-               }
-
-               void SetupDelegates ()
-               {
-                       send_handler = new AsyncSendHandler (Send);
-                       receive_handler = new AsyncReceiveHandler (Receive);
-                       wait_handler = new AsyncWaitForMessageHandler (WaitForMessage);
-               }
-
-               // Send
-
-               delegate void AsyncSendHandler (Message message, TimeSpan timeout);
-               AsyncSendHandler send_handler;
-
-               public virtual IAsyncResult BeginSend (Message message, AsyncCallback callback, object state)
-               {
-                       return BeginSend (message, DefaultSendTimeout, callback, state);
-               }
-
-               public virtual IAsyncResult BeginSend (Message message, TimeSpan timeout, AsyncCallback callback, object state)
-               {
-                       return send_handler.BeginInvoke (message, timeout, callback, state);
-               }
-
-               public virtual void EndSend (IAsyncResult result)
-               {
-                       send_handler.EndInvoke (result);
-               }
-
-               public virtual void Send (Message message)
-               {
-                       Send (message, this.DefaultSendTimeout);
-               }
-
-               public abstract void Send (Message message, TimeSpan timeout);
-
-               // Receive
-
-               delegate Message AsyncReceiveHandler (TimeSpan timeout);
-               AsyncReceiveHandler receive_handler;
-
-               public virtual IAsyncResult BeginReceive (AsyncCallback callback, object state)
-               {
-                       return BeginReceive (this.DefaultReceiveTimeout, callback, state);
-               }
-
-               public virtual IAsyncResult BeginReceive (TimeSpan timeout, AsyncCallback callback, object state)
-               {
-                       return receive_handler.BeginInvoke (timeout, callback, state);
-               }
-
-               public virtual Message EndReceive (IAsyncResult result)
-               {
-                       return receive_handler.EndInvoke (result);
-               }
-
-               public virtual Message Receive ()
-               {
-                       return Receive (this.DefaultReceiveTimeout);
-               }
-
-               public abstract Message Receive (TimeSpan timeout);
-
-               // TryReceive
-               // FIXME: apply those "async to call sync" pattern too (but how?)
-
-               public abstract IAsyncResult BeginTryReceive (TimeSpan timeout, AsyncCallback callback, object state);
-               
-               public abstract bool EndTryReceive (IAsyncResult result, out Message message);
-               
-               public virtual bool TryReceive (TimeSpan timeout, out Message message)
-               {
-                       return EndTryReceive (BeginTryReceive (timeout, null, null), out message);
-               }
-
-               // WaitForMessage
-
-               delegate bool AsyncWaitForMessageHandler (TimeSpan timeout);
-               AsyncWaitForMessageHandler wait_handler;
-
-               public virtual IAsyncResult BeginWaitForMessage (TimeSpan timeout, AsyncCallback callback, object state)
-               {
-                       return wait_handler.BeginInvoke (timeout, callback, state);
-               }
-               
-               public virtual bool EndWaitForMessage (IAsyncResult result)
-               {
-                       return wait_handler.EndInvoke (result);
-               }
-               
-               public abstract bool WaitForMessage (TimeSpan timeout);
-       }
-}
index bf487eabdff8efffb3a9a9968b15caba64384851..33f1440bdc95c189d7aa20f1281a8f5584525701 100755 (executable)
@@ -165,8 +165,8 @@ System.ServiceModel.Channels/CustomBinding.cs
 System.ServiceModel.Channels/DeliveryFailure.cs
 System.ServiceModel.Channels/DeliveryStatus.cs
 System.ServiceModel.Channels/DirectionalAction.cs
+System.ServiceModel.Channels/DuplexChannelBase.cs
 System.ServiceModel.Channels/DuplexSessionBase.cs
-System.ServiceModel.Channels/DuplexSessionChannelBase.cs
 System.ServiceModel.Channels/FaultConverter.cs
 System.ServiceModel.Channels/HostedTransportConfiguration.cs
 System.ServiceModel.Channels/HtmlizedException.cs