فهرست منبع

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

	* ChannelDispatcher.cs : fix regression; ServiceBehaviorAttribute
	  could be set explicitly null.


svn path=/trunk/mcs/; revision=147782
Atsushi Eno 16 سال پیش
والد
کامیت
07d0ed89df

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

@@ -1,3 +1,8 @@
+2009-12-07  Atsushi Enomoto  <[email protected]>
+
+	* ChannelDispatcher.cs : fix regression; ServiceBehaviorAttribute
+	  could be set explicitly null.
+
 2009-12-07  Atsushi Enomoto  <[email protected]>
 
 	* ChannelDispatcher.cs : handle AddressFilterMode (.Any only yet).

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

@@ -339,7 +339,9 @@ namespace System.ServiceModel.Dispatcher
 			public ListenerLoopManager (ChannelDispatcher owner)
 			{
 				this.owner = owner;
-				address_filter_mode = owner.Host.Description.Behaviors.Find<ServiceBehaviorAttribute> ().AddressFilterMode;
+				var sba = owner.Host != null ? owner.Host.Description.Behaviors.Find<ServiceBehaviorAttribute> () : null;
+				if (sba != null)
+					address_filter_mode = sba.AddressFilterMode;
 			}
 
 			public void Setup (TimeSpan openTimeout)