Ver Fonte

2009-09-11 Atsushi Enomoto <[email protected]>

	* ServiceHostBase.cs : partly revert dispatcher builder refactoring
	  to fix some ServiceHostBaseTest regressions.

	* ServiceMetadataExtension.cs : reflect ServiceHostBase change.


svn path=/trunk/mcs/; revision=141766
Atsushi Eno há 16 anos atrás
pai
commit
cd040e80be

+ 4 - 0
mcs/class/System.ServiceModel/System.ServiceModel.Description/ChangeLog

@@ -1,3 +1,7 @@
+2009-09-11  Atsushi Enomoto  <[email protected]>
+
+	* ServiceMetadataExtension.cs : reflect ServiceHostBase change.
+
 2009-09-11  Atsushi Enomoto  <[email protected]>
 
 	* ServiceDebugBehavior.cs : help page enabling properties are true

+ 1 - 1
mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceMetadataExtension.cs

@@ -120,7 +120,7 @@ namespace System.ServiceModel.Description
 				ListenUri = uri,
 			};
 
-			ChannelDispatcher channelDispatcher = serviceHostBase.BuildChannelDispatcher (se);
+			ChannelDispatcher channelDispatcher = serviceHostBase.BuildChannelDispatcher (se, new BindingParameterCollection ());
 
 			channelDispatcher.Endpoints [0].DispatchRuntime.InstanceContextProvider = new SingletonInstanceContextProvider (new InstanceContext (serviceHostBase, new HttpGetWsdl (sme, uri)));
 

+ 5 - 0
mcs/class/System.ServiceModel/System.ServiceModel/ChangeLog

@@ -1,3 +1,8 @@
+2009-09-11  Atsushi Enomoto  <[email protected]>
+
+	* ServiceHostBase.cs : partly revert dispatcher builder refactoring
+	  to fix some ServiceHostBaseTest regressions.
+
 2009-09-06  Atsushi Enomoto  <[email protected]>
 
 	* ClientProxyGenerator.cs : it missed end method argument on

+ 9 - 8
mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs

@@ -375,9 +375,14 @@ namespace System.ServiceModel
 			ServiceEndpoint[] endPoints = new ServiceEndpoint[Description.Endpoints.Count];
 			Description.Endpoints.CopyTo (endPoints, 0);
 			foreach (ServiceEndpoint se in endPoints) {
-				ChannelDispatcher channel = BuildChannelDispatcher (se);
-				ChannelDispatchers.Add (channel);				
-				endPointToDispatcher[se] = channel;				
+
+				var commonParams = new BindingParameterCollection ();
+				foreach (IServiceBehavior b in Description.Behaviors)
+					b.AddBindingParameters (Description, this, Description.Endpoints, commonParams);
+
+				ChannelDispatcher channel = BuildChannelDispatcher (se, commonParams);
+				ChannelDispatchers.Add (channel);
+				endPointToDispatcher[se] = channel;
 			}
 
 			//After the ChannelDispatchers are created, and attached to the service host
@@ -411,12 +416,8 @@ namespace System.ServiceModel
 
 		}
 
-		internal ChannelDispatcher BuildChannelDispatcher (ServiceEndpoint se)
+		internal ChannelDispatcher BuildChannelDispatcher (ServiceEndpoint se, BindingParameterCollection commonParams)
 		{
-			var commonParams = new BindingParameterCollection ();
-			foreach (IServiceBehavior b in Description.Behaviors)
-				b.AddBindingParameters (Description, this, Description.Endpoints, commonParams);
-
 			return new DispatcherBuilder ().BuildChannelDispatcher (Description.ServiceType, se, commonParams);
 		}