* ContractDescriptionGenerator.cs : fill Operation.Faults.
* FaultContractInfo.cs : implement.
* DispatchOperation.cs, ClientOperation.cs: fill Faults.
* net_2_1_raw_System.ServiceModel.dll.sources :
add FaultContractInfo.cs.
svn path=/trunk/mcs/; revision=149445
+2010-01-13 Astushi Enomoto <atsushi@ximian.com>
+
+ * net_2_1_raw_System.ServiceModel.dll.sources :
+ add FaultContractInfo.cs.
+
2010-01-13 Astushi Enomoto <atsushi@ximian.com>
* net_2_1_raw_System.ServiceModel.dll.sources :
+2010-01-13 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ContractDescriptionGenerator.cs : fill Operation.Faults.
+
2010-01-08 Atsushi Enomoto <atsushi@ximian.com>
* ContractDescriptionGenerator.cs : fix GetCallbackContract() to
foreach (ServiceKnownTypeAttribute a in serviceMethod.GetCustomAttributes (typeof (ServiceKnownTypeAttribute), false))
foreach (Type t in a.GetTypes ())
od.KnownTypes.Add (t);
+ foreach (FaultContractAttribute a in serviceMethod.GetCustomAttributes (typeof (FaultContractAttribute), false))
+ od.Faults.Add (new FaultDescription (a.Action) { DetailType = a.DetailType, Name = a.Name, Namespace = a.Namespace });
cd.Operations.Add (od);
}
else if (oca.AsyncPattern && od.BeginMethod != null ||
+2010-01-13 Atsushi Enomoto <atsushi@ximian.com>
+
+ * FaultContractInfo.cs : implement.
+ * DispatchOperation.cs, ClientOperation.cs: fill Faults.
+
2010-01-08 Atsushi Enomoto <atsushi@ximian.com>
* EndpointDispatcher.cs, InputOrReplyRequestProcessor.cs :
IClientMessageFormatter formatter, actual_formatter;
SynchronizedCollection<IParameterInspector> inspectors
= new SynchronizedCollection<IParameterInspector> ();
+#if !NET_2_1
+ SynchronizedCollection<FaultContractInfo> fault_contract_infos;
+#endif
public ClientOperation (ClientRuntime parent,
string name, string action)
#if !NET_2_1
public SynchronizedCollection<FaultContractInfo> FaultContractInfos {
- get { throw new NotImplementedException (); }
+ 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;
+ }
}
#endif
IOperationInvoker invoker;
SynchronizedCollection<IParameterInspector> inspectors
= new SynchronizedCollection<IParameterInspector> ();
- SynchronizedCollection<FaultContractInfo> fault_contract_infos
- = new SynchronizedCollection<FaultContractInfo> ();
+ SynchronizedCollection<FaultContractInfo> fault_contract_infos;
SynchronizedCollection<ICallContextInitializer> ctx_initializers
= new SynchronizedCollection<ICallContextInitializer> ();
}
public SynchronizedCollection<FaultContractInfo> FaultContractInfos {
- get { return fault_contract_infos; }
+ 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;
+ }
}
public IDispatchMessageFormatter Formatter {
{
public class FaultContractInfo
{
- string action;
- Type detail;
-
public FaultContractInfo (string action, Type detail)
{
+ if (action == null)
+ throw new ArgumentNullException ("action");
+ if (detail == null)
+ throw new ArgumentNullException ("detail");
+ Action = action;
+ Detail = detail;
}
- public string Action {
- get { return action; }
- }
+ public string Action { get; private set; }
- public Type Detail {
- get { return detail; }
- }
+ public Type Detail { get; private set; }
}
}
System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs
System.ServiceModel.Dispatcher/ClientOperation.cs
System.ServiceModel.Dispatcher/ClientRuntime.cs
+System.ServiceModel.Dispatcher/FaultContractInfo.cs
System.ServiceModel.Dispatcher/IChannelInitializer.cs
System.ServiceModel.Dispatcher/IClientMessageFormatter.cs
System.ServiceModel.Dispatcher/IClientMessageInspector.cs