Sfoglia il codice sorgente

2010-04-02 Atsushi Enomoto <[email protected]>

	* ClientOperation.cs : do not automatically fill FaultContractInfos.


svn path=/trunk/mcs/; revision=154693
Atsushi Eno 15 anni fa
parent
commit
f3a83a8e54

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

@@ -1,3 +1,7 @@
+2010-04-02  Atsushi Enomoto  <[email protected]>
+
+	* ClientOperation.cs : do not automatically fill FaultContractInfos.
+
 2010-04-02  Atsushi Enomoto  <[email protected]>
 
 	* OperationInvokerHandler.cs : implement FaultContractInfos support.

+ 2 - 10
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ClientOperation.cs

@@ -61,7 +61,7 @@ namespace System.ServiceModel.Dispatcher
 		SynchronizedCollection<IParameterInspector> inspectors
 			= new SynchronizedCollection<IParameterInspector> ();
 #if !NET_2_1
-		SynchronizedCollection<FaultContractInfo> fault_contract_infos;
+		SynchronizedCollection<FaultContractInfo> fault_contract_infos = new SynchronizedCollection<FaultContractInfo> ();
 #endif
 
 		public ClientOperation (ClientRuntime parent,
@@ -106,15 +106,7 @@ namespace System.ServiceModel.Dispatcher
 
 #if !NET_2_1
 		public SynchronizedCollection<FaultContractInfo> FaultContractInfos {
-			get {
-				if (fault_contract_infos == null) {
-					var l = new SynchronizedCollection<FaultContractInfo> ();
-					foreach (var f in Description.Faults)
-						l.Add (new FaultContractInfo (f.Action, f.DetailType));
-					fault_contract_infos = l;
-				}
-				return fault_contract_infos;
-			}
+			get { return fault_contract_infos; }
 		}
 #endif