Pārlūkot izejas kodu

2010-03-15 Atsushi Enomoto <[email protected]>

	* ServiceEndpointCollection.cs : those overrides are rather to check
	  null arguments, not to skip contract duplicates.


svn path=/trunk/mcs/; revision=153589
Atsushi Eno 16 gadi atpakaļ
vecāks
revīzija
994a5eda40

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

@@ -1,3 +1,8 @@
+2010-03-15  Atsushi Enomoto  <[email protected]>
+
+	* ServiceEndpointCollection.cs : those overrides are rather to check
+	  null arguments, not to skip contract duplicates.
+
 2010-03-12  Atsushi Enomoto  <[email protected]>
 
 	* MessageDescription.cs : implement MessageName.

+ 6 - 8
mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpointCollection.cs

@@ -107,20 +107,18 @@ namespace System.ServiceModel.Description
 			return list;
 		}
 
-		[MonoTODO]
 		protected override void InsertItem (int index, ServiceEndpoint item)
 		{
-			if (Find (new XmlQualifiedName (item.Contract.Name, item.Contract.Namespace)) == null)
-				base.InsertItem (index, item);
+			if (item == null)
+				throw new ArgumentNullException ("item");
+			base.InsertItem (index, item);
 		}
 
-		[MonoTODO]
 		protected override void SetItem (int index, ServiceEndpoint item)
 		{
-			if (Find (new XmlQualifiedName (item.Contract.Name, item.Contract.Namespace)) == null)
-				base.SetItem (index, item);
-			else
-				base.RemoveItem (index);
+			if (item == null)
+				throw new ArgumentNullException ("item");
+			base.SetItem (index, item);
 		}
 	}
 }