Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@ -94,7 +94,6 @@ namespace System.ServiceModel.Channels
Close ();
}
#if NET_4_5
public T GetBody<T> ()
{
return OnGetBody<T> (GetReaderAtBodyContents ());
@ -111,17 +110,6 @@ namespace System.ServiceModel.Channels
var xmlFormatter = new DataContractSerializer (typeof (T));
return (T)xmlFormatter.ReadObject (reader);
}
#else
public T GetBody<T> ()
{
return GetBody<T> (new DataContractSerializer (typeof (T)));
}
public T GetBody<T> (XmlObjectSerializer xmlFormatter)
{
return (T) xmlFormatter.ReadObject (GetReaderAtBodyContents ());
}
#endif
public string GetBodyAttribute (string localName, string ns)
{
@ -180,7 +168,8 @@ namespace System.ServiceModel.Channels
if (!IsEmpty) {
if (copied_message != null)
copied_message.WriteBodyContents (writer);
OnWriteBodyContents (writer);
else
OnWriteBodyContents (writer);
}
else if (Version.Envelope == EnvelopeVersion.None)
WriteXsiNil (writer);