165 references to Body
dotnet-svcutil-lib (165)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AsymmetricSecurityBindingElement.cs (8)
275
if (OperationFormatter.IsValidReturnValue(message.
Body
.ReturnValue))
277
ValidateExistingOrSetNewProtectionLevel(message.
Body
.ReturnValue, message, operation, policyContext.Contract, newProtectionLevel);
279
foreach (MessagePartDescription body in message.
Body
.Parts)
283
if (!OperationFormatter.IsValidReturnValue(message.
Body
.ReturnValue) || message.
Body
.Parts.Count == 0)
428
if (OperationFormatter.IsValidReturnValue(message.
Body
.ReturnValue))
430
message.
Body
.ReturnValue.ResetProtectionLevel();
432
foreach (MessagePartDescription body in message.
Body
.Parts)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\DataContractSerializerOperationGenerator.cs (7)
89
foreach (MessagePartDescription part in message.
Body
.Parts)
93
if (OperationFormatter.IsValidReturnValue(message.
Body
.ReturnValue))
94
AddKnownTypesForPart(context, message.
Body
.ReturnValue, operationKnownTypes);
156
if (messageDescription.
Body
!= null)
158
if (messageDescription.
Body
.ReturnValue != null)
159
ValidateForParameterMode(messageDescription.
Body
.ReturnValue);
160
foreach (MessagePartDescription bodyPart in messageDescription.
Body
.Parts)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageContractImporter.cs (25)
491
if (isReturn && messageDescription.
Body
.ReturnValue == null)
492
messageDescription.
Body
.ReturnValue = partDesc;
494
messageDescription.
Body
.Parts.Add(partDesc);
497
if (isReply && messageDescription.
Body
.ReturnValue == null)
499
if (messageDescription.
Body
.Parts.Count > 0)
501
if (!CheckIsRef(operation.Messages[0], messageDescription.
Body
.Parts[0]))
503
messageDescription.
Body
.ReturnValue = messageDescription.
Body
.Parts[0];
504
messageDescription.
Body
.Parts.RemoveAt(0);
548
request.
Body
.WrapperName = operation.Name;
549
request.
Body
.WrapperNamespace = operation.DeclaringContract.Namespace;
556
response.
Body
.WrapperName = TypeLoader.GetBodyWrapperResponseName(operation.Name).EncodedName;
557
response.
Body
.WrapperNamespace = operation.DeclaringContract.Namespace;
686
description.
Body
.WrapperName = new XmlName(part.Element.Name, true /*isEncoded*/).EncodedName;
687
description.
Body
.WrapperNamespace = part.Element.Namespace;
725
messageDescription.
Body
.WrapperName = new XmlName(elementName.Name, true /*isEncoded*/).EncodedName;
726
messageDescription.
Body
.WrapperNamespace = elementName.Namespace;
731
if (isReply && messageDescription.
Body
.ReturnValue == null && !CheckIsRef(requestMessage, parts[0]))
733
messageDescription.
Body
.ReturnValue = parts[0];
739
messageDescription.
Body
.Parts.Add(part);
760
foreach (MessagePartDescription requestPart in requestMessage.
Body
.Parts)
1232
if (isReply && description.
Body
.ReturnValue == null)
1233
description.
Body
.ReturnValue = bodyPart;
1235
description.
Body
.Parts.Add(bodyPart);
1423
description.
Body
.WrapperNamespace = bodyBinding.Namespace;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MessageDescription.cs (9)
160
return (
Body
.ReturnValue != null &&
Body
.Parts.Count == 0 &&
Body
.ReturnValue.Type == TypeOfUntypedMessage) ||
161
(
Body
.ReturnValue == null &&
Body
.Parts.Count == 1 &&
Body
.Parts[0].Type == TypeOfUntypedMessage);
169
return !IsTypedMessage &&
Body
.Parts.Count == 0 && (
Body
.ReturnValue == null ||
Body
.ReturnValue.Type == typeof(void));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationDescription.cs (1)
235
(this.Messages[1].
Body
.Parts.Count > 0);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\OperationGenerator.cs (40)
257
if (!_oneway && _response.
Body
.ReturnValue != null)
259
_endMethod.ReturnType = GetParameterType(_response.
Body
.ReturnValue);
260
ParameterizedMessageHelper.GenerateMessageParameterAttribute(_response.
Body
.ReturnValue, _endMethod.ReturnTypeCustomAttributes, TypeLoader.GetReturnValueName(_defaultName), _defaultNS);
261
AddAdditionalAttributes(_response.
Body
.ReturnValue, _endMethod.ReturnTypeCustomAttributes, _isEncoded);
317
if (_messageContractType == MessageContractType.BareMessageContract && message.
Body
.WrapperName != null)
332
if (isReply && message.
Body
.ReturnValue != null)
334
GenerateBodyPart(0, message.
Body
.ReturnValue, partCodeGenerator, true, _isEncoded, _defaultNS);
361
return (message.
Body
.Parts.Count == 0 && message.Headers.Count == 0);
605
if (messageDescription.
Body
.ReturnValue != null)
607
AddWrapperPart(messageDescription.MessageName, _wrappedBodyTypeGenerator, partGenerator, messageDescription.
Body
.ReturnValue, wrapperTypeDecl.CustomAttributes);
608
protectionLevel = ProtectionLevelHelper.Max(protectionLevel, messageDescription.
Body
.ReturnValue.ProtectionLevel);
609
if (messageDescription.
Body
.ReturnValue.HasProtectionLevel)
614
foreach (MessagePartDescription part in messageDescription.
Body
.Parts)
628
messageDescription.
Body
.Parts.Clear();
630
MessagePartDescription wrapperPart = new MessagePartDescription(messageDescription.
Body
.WrapperName, messageDescription.
Body
.WrapperNamespace);
635
messageDescription.
Body
.WrapperName = null;
636
messageDescription.
Body
.WrapperNamespace = null;
638
messageDescription.
Body
.ReturnValue = wrapperPart;
640
messageDescription.
Body
.Parts.Add(wrapperPart);
649
if (messageDescription.
Body
.ReturnValue != null)
650
defaultNS = messageDescription.
Body
.ReturnValue.Namespace;
651
else if (messageDescription.
Body
.Parts.Count > 0)
652
defaultNS = messageDescription.
Body
.Parts[0].Namespace;
661
foreach (MessagePartDescription setting in _request.
Body
.Parts)
667
order = _response.
Body
.ReturnValue != null ? 1 : 0;
668
foreach (MessagePartDescription setting in _response.
Body
.Parts)
779
if (message.
Body
.WrapperName != null)
783
new CodePrimitiveExpression(NamingHelper.CodeName(message.
Body
.WrapperName))));
785
new CodePrimitiveExpression(message.
Body
.WrapperNamespace)));
899
if (parent._request.
Body
.WrapperName == null || (parent._response != null && parent._response.
Body
.WrapperName == null))
902
if (!StringEqualOrNull(parent._request.
Body
.WrapperNamespace, parent._contractNS))
903
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ParameterModeException(string.Format(SRServiceModel.SFxCannotImportAsParameters_DifferentWrapperNs, parent._request.MessageName, parent._request.
Body
.WrapperNamespace, parent._contractNS)));
906
if (!String.Equals(parent._request.
Body
.WrapperName, defaultName.EncodedName, StringComparison.Ordinal))
907
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ParameterModeException(string.Format(SRServiceModel.SFxCannotImportAsParameters_DifferentWrapperName, parent._request.MessageName, parent._request.
Body
.WrapperName, defaultName.EncodedName)));
911
if (!StringEqualOrNull(parent._response.
Body
.WrapperNamespace, parent._contractNS))
912
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ParameterModeException(string.Format(SRServiceModel.SFxCannotImportAsParameters_DifferentWrapperNs, parent._response.MessageName, parent._response.
Body
.WrapperNamespace, parent._contractNS)));
914
if (!String.Equals(parent._response.
Body
.WrapperName, TypeLoader.GetBodyWrapperResponseName(defaultName).EncodedName, StringComparison.Ordinal))
915
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ParameterModeException(string.Format(SRServiceModel.SFxCannotImportAsParameters_DifferentWrapperName, parent._response.MessageName, parent._response.
Body
.WrapperName, defaultName.EncodedName)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (15)
1071
responseDescription.
Body
.WrapperName = responseDescription.
Body
.WrapperNamespace = null;
1076
requestDescription.
Body
.WrapperName = requestDescription.
Body
.WrapperNamespace = null;
1225
MessagePartDescriptionCollection partDescriptionCollection = messageDescription.
Body
.Parts;
1231
messageDescription.
Body
.Parts.Add(partDescription);
1236
messageDescription.
Body
.ReturnValue = CreateParameterPartDescription(returnValueName, defaultNS, 0, returnAttrProvider, returnType);
1240
messageDescription.
Body
.WrapperName = null;
1241
messageDescription.
Body
.WrapperNamespace = null;
1245
messageDescription.
Body
.WrapperName = wrapperName.EncodedName;
1246
messageDescription.
Body
.WrapperNamespace = wrapperNamespace;
1288
messageDescription.
Body
.WrapperName = GetWrapperName(messageContractAttribute.WrapperName, messageDescription.MessageName).EncodedName;
1289
messageDescription.
Body
.WrapperNamespace = messageContractAttribute.WrapperNamespace ?? defaultNS;
1390
messageDescription.
Body
.ReturnValue = CreateMessagePartDescription(typeof(void),
1398
AddSortedParts<MessagePartDescription>(bodyPartDescriptionList, messageDescription.
Body
.Parts);
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (5)
444
returnPart = OperationFormatter.IsValidReturnValue(message.
Body
.ReturnValue) ? message.
Body
.ReturnValue : null;
445
bodyParts = message.
Body
.Parts;
446
wrapperName = message.
Body
.WrapperName;
447
wrapperNs = message.
Body
.WrapperNamespace;
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationGenerator.cs (1)
130
MessageBodyDescription body = message.
Body
;
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (3)
102
MessageBodyDescription body = messageDescription.
Body
;
112
if (IsValidReturnValue(messageDescription.
Body
.ReturnValue))
113
messageInfo.ReturnPart = CreatePartInfo(messageDescription.
Body
.ReturnValue, dataContractFormatAttribute.Style, serializerFactory);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (4)
36
int stringCount = 3 + _requestDescription.
Body
.Parts.Count;
38
stringCount += 2 + _replyDescription.
Body
.Parts.Count;
582
_members = new MemberInfo[description.
Body
.Parts.Count + description.Properties.Count + description.Headers.Count];
590
foreach (MessagePartDescription part in description.
Body
.Parts)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (17)
47
int stringCount = 3 + _requestMessage.
Body
.Parts.Count;
49
stringCount += 2 + _responseMessage.
Body
.Parts.Count;
58
if (_requestMessage.
Body
.WrapperName != null)
60
_requestWrapperName = AddToDictionary(dictionary, _requestMessage.
Body
.WrapperName);
61
_requestWrapperNamespace = AddToDictionary(dictionary, _requestMessage.
Body
.WrapperNamespace);
64
_requestParts = AddToDictionary(dictionary, _requestMessage.
Body
.Parts, isRpc);
68
if (_responseMessage.
Body
.WrapperName != null)
70
_responseWrapperName = AddToDictionary(dictionary, _responseMessage.
Body
.WrapperName);
71
_responseWrapperNamespace = AddToDictionary(dictionary, _responseMessage.
Body
.WrapperNamespace);
74
_responseParts = AddToDictionary(dictionary, _responseMessage.
Body
.Parts, isRpc);
76
if (_responseMessage.
Body
.ReturnValue != null && _responseMessage.
Body
.ReturnValue.Type != typeof(void))
78
_returnPart = AddToDictionary(dictionary, _responseMessage.
Body
.ReturnValue, isRpc);
272
if (!AreTypesSupported(requestMessage.
Body
.Parts))
276
if (!AreTypesSupported(responseMessage.
Body
.Parts))
278
if (responseMessage.
Body
.ReturnValue != null && !IsTypeSupported(responseMessage.
Body
.ReturnValue))
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\StreamFormatter.cs (13)
38
if ((object)streamPart == (object)messageDescription.
Body
.ReturnValue)
42
_wrapperName = messageDescription.
Body
.WrapperName;
43
_wrapperNS = messageDescription.
Body
.WrapperNamespace;
188
if (messageDescription.
Body
.ReturnValue != null && messageDescription.
Body
.ReturnValue.Type == typeof(Stream))
190
foreach (MessagePartDescription part in messageDescription.
Body
.Parts)
200
if (OperationFormatter.IsValidReturnValue(messageDescription.
Body
.ReturnValue))
202
if (messageDescription.
Body
.Parts.Count == 0)
203
if (messageDescription.
Body
.ReturnValue.Type == typeof(Stream))
204
return messageDescription.
Body
.ReturnValue;
208
if (messageDescription.
Body
.Parts.Count == 1)
209
if (messageDescription.
Body
.Parts[0].Type == typeof(Stream))
210
return messageDescription.
Body
.Parts[0];
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (7)
274
SerializeBody(writer, version, messageInfo.BodySerializer, messageDescription.
Body
.ReturnValue, messageDescription.
Body
.Parts, returnValue, parameters);
279
object bodyObject = parameters[messageDescription.
Body
.Parts[0].Index];
334
return DeserializeBody(reader, version, messageInfo.BodySerializer, messageDescription.
Body
.ReturnValue, messageDescription.
Body
.Parts, parameters, isRequest);
338
object bodyObject = Activator.CreateInstance(messageDescription.
Body
.Parts[0].Type);
353
parameters[messageDescription.
Body
.Parts[0].Index] = bodyObject;
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ChannelProtectionRequirements.cs (6)
261
if (message.
Body
.Parts.Count > 0)
267
else if (message.
Body
.ReturnValue != null)
269
if (!(message.
Body
.ReturnValue.GetType().Equals(typeof(MessagePartDescription))))
274
MessagePartDescription desc = message.
Body
.ReturnValue;
283
if (message.
Body
.Parts.Count > 0)
285
foreach (MessagePartDescription body in message.
Body
.Parts)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSTrust.cs (4)
653
if (message.
Body
.Parts.Count > 0)
655
foreach (MessagePartDescription part in message.
Body
.Parts)
660
if (OperationFormatter.IsValidReturnValue(message.
Body
.ReturnValue))
662
message.
Body
.ReturnValue.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign;