2009-06-08 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Mon, 8 Jun 2009 16:47:18 +0000 (16:47 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Mon, 8 Jun 2009 16:47:18 +0000 (16:47 -0000)
* HttpChannelManager.cs, HttpListenerManager.cs : rename file too.

* System.ServiceModel.dll.sources: renamed a file.

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

1  2 
mcs/class/System.ServiceModel/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelManager.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpListenerManager.cs
mcs/class/System.ServiceModel/System.ServiceModel.dll.sources

index f17b094b3760806099f3f4b7af5421831e27bf3c,f17b094b3760806099f3f4b7af5421831e27bf3c..e2befda407cd588b7be0cafbb0be68290e3b6f91
@@@ -1,3 -1,3 +1,7 @@@
++2009-06-08  Astushi Enomoto  <atsushi@ximian.com>
++
++      * System.ServiceModel.dll.sources: renamed a file.
++
  2009-06-05  Sebastien Pouliot  <sebastien@ximian.com>
  
        * net_2_1_raw_System.ServiceModel.dll.sources: Remove 
index c85ac9be65d3e91f36044832a025eb714860adc2,c85ac9be65d3e91f36044832a025eb714860adc2..a0722cff7f480edcb10357ca9955597e0b9114d8
@@@ -1,3 -1,3 +1,7 @@@
++2009-06-08  Atsushi Enomoto  <atsushi@ximian.com>
++
++      * HttpChannelManager.cs, HttpListenerManager.cs : rename file too.
++
  2009-06-08  Atsushi Enomoto  <atsushi@ximian.com>
  
        * HttpChannelManager.cs, HttpChannelListener.cs: renaming, as
diff --cc mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpChannelManager.cs
index f3fc05f2059be2c5b1e3e4d4191b90620fed8c44,f3fc05f2059be2c5b1e3e4d4191b90620fed8c44..0000000000000000000000000000000000000000
deleted file mode 100644,100644
+++ /dev/null
@@@ -1,96 -1,96 +1,0 @@@
--//
--// HttpListenerManager.cs
--//
--// Author:
--//    Vladimir Krasnov <vladimirk@mainsoft.com>
--//
--// Copyright (C) 2005-2006 Mainsoft, Inc.  http://www.mainsoft.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.Collections.Generic;
--using System.Text;
--using System.Net;
--
--namespace System.ServiceModel.Channels
--{
--      internal class HttpListenerManager<TChannel> where TChannel : class, IChannel
--      {
--              static Dictionary<Uri, HttpListener> opened_listeners;
--              static Dictionary<Uri, List<HttpSimpleChannelListener<TChannel>>> registered_channels;
--              HttpSimpleChannelListener<TChannel> channel_listener;
--              HttpListener http_listener;
--
--              static HttpListenerManager ()
--              {
--                      opened_listeners = new Dictionary<Uri, HttpListener> ();
--                      registered_channels = new Dictionary<Uri, List<HttpSimpleChannelListener<TChannel>>> ();
--              }
--
--              public HttpListenerManager (HttpSimpleChannelListener<TChannel> channel_listener)
--              {
--                      this.channel_listener = channel_listener;
--              }
--
--              public void Open (TimeSpan timeout)
--              {
--                      lock (opened_listeners) {
--                              if (!opened_listeners.ContainsKey (channel_listener.Uri)) {
--                                      HttpListener listener = new HttpListener ();
--
--                                      string uriString = channel_listener.Uri.ToString ();
--                                      if (!uriString.EndsWith ("/", StringComparison.Ordinal))
--                                              uriString += "/";
--                                      listener.Prefixes.Add (uriString);
--                                      listener.Start ();
--
--                                      opened_listeners [channel_listener.Uri] = listener;
--                                      List<HttpSimpleChannelListener<TChannel>> registeredList = new List<HttpSimpleChannelListener<TChannel>> ();
--                                      registered_channels [channel_listener.Uri] = registeredList;
--                              }
--
--                              http_listener = opened_listeners [channel_listener.Uri];
--                              registered_channels [channel_listener.Uri].Add (channel_listener);
--                      }
--              }
--
--              public void Stop ()
--              {
--                      lock (opened_listeners) {
--                              if (http_listener == null)
--                                      return;
--                              List<HttpSimpleChannelListener<TChannel>> channelsList = registered_channels [channel_listener.Uri];
--                              channelsList.Remove (channel_listener);
--                              if (channelsList.Count == 0) {
--                                      if (http_listener.IsListening)
--                                              http_listener.Stop ();
--                                      ((IDisposable) http_listener).Dispose ();
--
--                                      opened_listeners.Remove (channel_listener.Uri);
--                      }
--              }
--
--              public HttpListener HttpListener
--              {
--                      get { return http_listener; }
--              }
--      }       
--}
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f3fc05f2059be2c5b1e3e4d4191b90620fed8c44
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,96 @@@
++//
++// HttpListenerManager.cs
++//
++// Author:
++//    Vladimir Krasnov <vladimirk@mainsoft.com>
++//
++// Copyright (C) 2005-2006 Mainsoft, Inc.  http://www.mainsoft.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.Collections.Generic;
++using System.Text;
++using System.Net;
++
++namespace System.ServiceModel.Channels
++{
++      internal class HttpListenerManager<TChannel> where TChannel : class, IChannel
++      {
++              static Dictionary<Uri, HttpListener> opened_listeners;
++              static Dictionary<Uri, List<HttpSimpleChannelListener<TChannel>>> registered_channels;
++              HttpSimpleChannelListener<TChannel> channel_listener;
++              HttpListener http_listener;
++
++              static HttpListenerManager ()
++              {
++                      opened_listeners = new Dictionary<Uri, HttpListener> ();
++                      registered_channels = new Dictionary<Uri, List<HttpSimpleChannelListener<TChannel>>> ();
++              }
++
++              public HttpListenerManager (HttpSimpleChannelListener<TChannel> channel_listener)
++              {
++                      this.channel_listener = channel_listener;
++              }
++
++              public void Open (TimeSpan timeout)
++              {
++                      lock (opened_listeners) {
++                              if (!opened_listeners.ContainsKey (channel_listener.Uri)) {
++                                      HttpListener listener = new HttpListener ();
++
++                                      string uriString = channel_listener.Uri.ToString ();
++                                      if (!uriString.EndsWith ("/", StringComparison.Ordinal))
++                                              uriString += "/";
++                                      listener.Prefixes.Add (uriString);
++                                      listener.Start ();
++
++                                      opened_listeners [channel_listener.Uri] = listener;
++                                      List<HttpSimpleChannelListener<TChannel>> registeredList = new List<HttpSimpleChannelListener<TChannel>> ();
++                                      registered_channels [channel_listener.Uri] = registeredList;
++                              }
++
++                              http_listener = opened_listeners [channel_listener.Uri];
++                              registered_channels [channel_listener.Uri].Add (channel_listener);
++                      }
++              }
++
++              public void Stop ()
++              {
++                      lock (opened_listeners) {
++                              if (http_listener == null)
++                                      return;
++                              List<HttpSimpleChannelListener<TChannel>> channelsList = registered_channels [channel_listener.Uri];
++                              channelsList.Remove (channel_listener);
++                              if (channelsList.Count == 0) {
++                                      if (http_listener.IsListening)
++                                              http_listener.Stop ();
++                                      ((IDisposable) http_listener).Dispose ();
++
++                                      opened_listeners.Remove (channel_listener.Uri);
++                      }
++              }
++
++              public HttpListener HttpListener
++              {
++                      get { return http_listener; }
++              }
++      }       
++}
index 33f1440bdc95c189d7aa20f1281a8f5584525701,33f1440bdc95c189d7aa20f1281a8f5584525701..50001d20721efab7d68d57ea08e73dec872afde0
@@@ -172,7 -172,7 +172,7 @@@ System.ServiceModel.Channels/HostedTran
  System.ServiceModel.Channels/HtmlizedException.cs
  System.ServiceModel.Channels/HttpChannelFactory.cs
  System.ServiceModel.Channels/HttpChannelListener.cs
--System.ServiceModel.Channels/HttpChannelManager.cs
++System.ServiceModel.Channels/HttpListenerManager.cs
  System.ServiceModel.Channels/HttpReplyChannel.cs
  System.ServiceModel.Channels/HttpRequestChannel.cs
  System.ServiceModel.Channels/HttpRequestContext.cs