Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushi@ximian.com>2011-06-14 12:58:26 +0400
committerAtsushi Eno <atsushi@ximian.com>2011-06-14 12:58:26 +0400
commit70015f9ba5563308d1c0861e3143965d9f86805b (patch)
tree9a69cd84d9bbdd8fc399dde5e6cfd85ff919e249 /mcs/class/System.ServiceModel/System.ServiceModel.Description
parent9abe978c8cc77bd2c968fec747e3e3ab95c2bfb1 (diff)
Flush some ongoing changes for XmlSerializer support in svcutil.
Diffstat (limited to 'mcs/class/System.ServiceModel/System.ServiceModel.Description')
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerMessageContractImporter.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceContractGenerator.cs3
2 files changed, 4 insertions, 1 deletions
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerMessageContractImporter.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerMessageContractImporter.cs
index eb72662f565..bc5610647f7 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerMessageContractImporter.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerMessageContractImporter.cs
@@ -189,7 +189,7 @@ namespace System.ServiceModel.Description
foreach (OperationMessage opmsg in op.Messages) {
var parts = context.GetMessageDescription (opmsg).Body.Parts;
foreach (var part in parts)
- if (part.DataContractImporter != null)
+ if (part.DataContractImporter != null || part.XmlSerializationImporter != null)
return true;
}
return false;
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceContractGenerator.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceContractGenerator.cs
index f6b47c52caf..e26e6cb06b6 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceContractGenerator.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceContractGenerator.cs
@@ -365,6 +365,9 @@ namespace System.ServiceModel.Description
{
CodeMemberMethod cm = new CodeMemberMethod ();
+ if (od.Behaviors.Find<XmlSerializerMappingBehavior> () != null)
+ cm.CustomAttributes.Add (new CodeAttributeDeclaration (new CodeTypeReference (typeof (XmlSerializerFormatAttribute))));
+
if (async)
cm.Name = "Begin" + od.Name;
else