88 references to Body
System.ServiceModel.Primitives (87)
System\ServiceModel\Description\MessageDescription.cs (9)
145return (Body.ReturnValue != null && Body.Parts.Count == 0 && Body.ReturnValue.Type == TypeOfUntypedMessage) || 146(Body.ReturnValue == null && Body.Parts.Count == 1 && Body.Parts[0].Type == TypeOfUntypedMessage); 154return !IsTypedMessage && Body.Parts.Count == 0 && (Body.ReturnValue == null || Body.ReturnValue.Type == typeof(void));
System\ServiceModel\Description\OperationDescription.cs (1)
164(Messages[1].Body.Parts.Count > 0);
System\ServiceModel\Description\TypeLoader.cs (15)
1088responseDescription.Body.WrapperName = responseDescription.Body.WrapperNamespace = null; 1093requestDescription.Body.WrapperName = requestDescription.Body.WrapperNamespace = null; 1252MessagePartDescriptionCollection partDescriptionCollection = messageDescription.Body.Parts; 1261messageDescription.Body.Parts.Add(partDescription); 1266messageDescription.Body.ReturnValue = CreateParameterPartDescription(returnValueName, defaultNS, 0, returnAttrProvider, returnType); 1270messageDescription.Body.WrapperName = null; 1271messageDescription.Body.WrapperNamespace = null; 1275messageDescription.Body.WrapperName = wrapperName.EncodedName; 1276messageDescription.Body.WrapperNamespace = wrapperNamespace; 1320messageDescription.Body.WrapperName = GetWrapperName(messageContractAttribute.WrapperName, messageDescription.MessageName).EncodedName; 1321messageDescription.Body.WrapperNamespace = messageContractAttribute.WrapperNamespace ?? defaultNS; 1435messageDescription.Body.ReturnValue = CreateMessagePartDescription(typeof(void), 1443AddSortedParts(bodyPartDescriptionList, messageDescription.Body.Parts);
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (8)
529if (IsEncoded && message.IsTypedMessage && message.Body.WrapperName == null) 540returnPart = OperationFormatter.IsValidReturnValue(message.Body.ReturnValue) ? message.Body.ReturnValue : null; 541bodyParts = message.Body.Parts; 542wrapperName = message.Body.WrapperName; 543wrapperNs = message.Body.WrapperNamespace; 576if (message.Body.Parts.Count != 1) 581MessagePartDescription bodyPart = message.Body.Parts[0];
System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (3)
116MessageBodyDescription body = messageDescription.Body; 129if (IsValidReturnValue(messageDescription.Body.ReturnValue)) 131messageInfo.ReturnPart = CreatePartInfo(messageDescription.Body.ReturnValue, dataContractFormatAttribute.Style, serializerFactory);
System\ServiceModel\Dispatcher\OperationFormatter.cs (4)
35int stringCount = 3 + _requestDescription.Body.Parts.Count; 38stringCount += 2 + ReplyDescription.Body.Parts.Count; 628_members = new MemberInfo[description.Body.Parts.Count + description.Properties.Count + description.Headers.Count]; 640foreach (MessagePartDescription part in description.Body.Parts)
System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (17)
54int stringCount = 3 + _requestMessage.Body.Parts.Count; 57stringCount += 2 + _responseMessage.Body.Parts.Count; 67if (_requestMessage.Body.WrapperName != null) 69_requestWrapperName = AddToDictionary(dictionary, _requestMessage.Body.WrapperName); 70_requestWrapperNamespace = AddToDictionary(dictionary, _requestMessage.Body.WrapperNamespace); 73_requestParts = AddToDictionary(dictionary, _requestMessage.Body.Parts, isRpc); 77if (_responseMessage.Body.WrapperName != null) 79_responseWrapperName = AddToDictionary(dictionary, _responseMessage.Body.WrapperName); 80_responseWrapperNamespace = AddToDictionary(dictionary, _responseMessage.Body.WrapperNamespace); 83_responseParts = AddToDictionary(dictionary, _responseMessage.Body.Parts, isRpc); 85if (_responseMessage.Body.ReturnValue != null && _responseMessage.Body.ReturnValue.Type != typeof(void)) 87_returnPart = AddToDictionary(dictionary, _responseMessage.Body.ReturnValue, isRpc); 337if (!AreTypesSupported(requestMessage.Body.Parts)) 344if (!AreTypesSupported(responseMessage.Body.Parts)) 349if (responseMessage.Body.ReturnValue != null && !IsTypeSupported(responseMessage.Body.ReturnValue))
System\ServiceModel\Dispatcher\StreamFormatter.cs (13)
39if ((object)streamPart == (object)messageDescription.Body.ReturnValue) 48WrapperName = messageDescription.Body.WrapperName; 49WrapperNamespace = messageDescription.Body.WrapperNamespace; 233if (messageDescription.Body.ReturnValue != null && messageDescription.Body.ReturnValue.Type == typeof(Stream)) 238foreach (MessagePartDescription part in messageDescription.Body.Parts) 250if (OperationFormatter.IsValidReturnValue(messageDescription.Body.ReturnValue)) 252if (messageDescription.Body.Parts.Count == 0) 254if (messageDescription.Body.ReturnValue.Type == typeof(Stream)) 256return messageDescription.Body.ReturnValue; 262if (messageDescription.Body.Parts.Count == 1) 264if (messageDescription.Body.Parts[0].Type == typeof(Stream)) 266return messageDescription.Body.Parts[0];
System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (7)
330SerializeBody(writer, version, messageInfo.BodySerializer, messageDescription.Body.ReturnValue, messageDescription.Body.Parts, returnValue, parameters); 335object bodyObject = parameters[messageDescription.Body.Parts[0].Index]; 408return DeserializeBody(reader, version, messageInfo.BodySerializer, messageDescription.Body.ReturnValue, messageDescription.Body.Parts, parameters, isRequest); 413object bodyObject = Activator.CreateInstance(messageDescription.Body.Parts[0].Type); 432parameters[messageDescription.Body.Parts[0].Index] = bodyObject;
System\ServiceModel\Security\ChannelProtectionRequirements.cs (6)
255if (message.Body.Parts.Count > 0) 261else if (message.Body.ReturnValue != null) 263if (!(message.Body.ReturnValue.GetType().Equals(typeof(MessagePartDescription)))) 268MessagePartDescription desc = message.Body.ReturnValue; 277if (message.Body.Parts.Count > 0) 279foreach (MessagePartDescription body in message.Body.Parts)
System\ServiceModel\Security\WSTrust.cs (4)
1186if (message.Body.Parts.Count > 0) 1188foreach (MessagePartDescription part in message.Body.Parts) 1193if (OperationFormatter.IsValidReturnValue(message.Body.ReturnValue)) 1195message.Body.ReturnValue.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign;
UnitTests.Common (1)
TestHelpers.cs (1)
200ValidatePartDescriptionCollection(messageData.Action, "Body", errorBuilder, messageDesc.Body.Parts.ToArray(), messageData.Body);