Pārlūkot izejas kodu

2009-12-07 Atsushi Enomoto <[email protected]>

	* ServiceHostBase.cs : in AddBaseAddress(), use base_addresses
	  instead of Description. It could be called in InitializeDescription.

	* InstanceBehavior.cs : allow nonpublic instance.
	* DefaultOperationInvoker.cs : do use IsSynchronous correctly.


svn path=/trunk/mcs/; revision=147774
Atsushi Eno 16 gadi atpakaļ
vecāks
revīzija
85f58a5b94

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

@@ -1,3 +1,8 @@
+2009-12-07  Atsushi Enomoto  <[email protected]>
+
+	* InstanceBehavior.cs : allow nonpublic instance.
+	* DefaultOperationInvoker.cs : do use IsSynchronous correctly.
+
 2009-10-22  Atsushi Enomoto  <[email protected]>
 
 	* ChannelDispatcher.cs : disable concurrent channel acceptance

+ 3 - 1
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/DefaultOperationInvoker.cs

@@ -38,10 +38,12 @@ namespace System.ServiceModel.Dispatcher
 	{
 		readonly OperationDescription od;
 		readonly ParameterInfo [] in_params, out_params;
+		readonly bool is_synchronous;
 
 		public DefaultOperationInvoker (OperationDescription od)
 		{
 			this.od = od;
+			is_synchronous = od.SyncMethod != null;
 			var mi = od.SyncMethod ?? od.BeginMethod;
 			var il = new List<ParameterInfo> ();
 			var ol = new List<ParameterInfo> ();
@@ -59,7 +61,7 @@ namespace System.ServiceModel.Dispatcher
 		}
 
 		public bool IsSynchronous {
-			get { return true; }
+			get { return is_synchronous; }
 		}
 
 		public object [] AllocateInputs ()

+ 3 - 2
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/InstanceBehavior.cs

@@ -1,5 +1,6 @@
-using System;
+using System;
 using System.Collections.Generic;
+using System.Reflection;
 using System.ServiceModel;
 using System.ServiceModel.Dispatcher;
 using System.ServiceModel.Channels;
@@ -34,7 +35,7 @@ namespace System.ServiceModel.Dispatcher
 			}
 			createdByUserProvider = false;
 			return Activator.CreateInstance (
-				dispatch_runtime.ChannelDispatcher.Host.Description.ServiceType);			
+				dispatch_runtime.ChannelDispatcher.Host.Description.ServiceType, true);
 		}
 
 		internal IInstanceContextProvider InstanceContextProvider {

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

@@ -1,3 +1,8 @@
+2009-12-07  Atsushi Enomoto  <[email protected]>
+
+	* ServiceHostBase.cs : in AddBaseAddress(), use base_addresses
+	  instead of Description. It could be called in InitializeDescription.
+
 2009-12-03  Atsushi Enomoto  <[email protected]>
 
 	* BasicHttpBinding.cs : handle transport security properties.

+ 1 - 1
mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs

@@ -163,7 +163,7 @@ namespace System.ServiceModel
 
 		protected void AddBaseAddress (Uri baseAddress)
 		{
-			if (Description != null)
+			if (base_addresses == null)
 				throw new InvalidOperationException ("Base addresses must be added before the service description is initialized");
 			base_addresses.Add (baseAddress);
 		}