347 references to Body
System.ServiceModel (210)
System\ServiceModel\Channels\SecurityBindingElementImporter.cs (8)
276
if (OperationFormatter.IsValidReturnValue(message.
Body
.ReturnValue))
278
ValidateExistingOrSetNewProtectionLevel(message.
Body
.ReturnValue, message, operation, policyContext.Contract, newProtectionLevel);
280
foreach (MessagePartDescription body in message.
Body
.Parts)
284
if (!OperationFormatter.IsValidReturnValue(message.
Body
.ReturnValue) || message.
Body
.Parts.Count == 0)
429
if (OperationFormatter.IsValidReturnValue(message.
Body
.ReturnValue))
431
message.
Body
.ReturnValue.ResetProtectionLevel();
433
foreach (MessagePartDescription body in message.
Body
.Parts)
System\ServiceModel\ComIntegration\ComPlusTypeLoader.cs (5)
299
messageDescription.
Body
.WrapperNamespace = ns;
319
messageDescription.
Body
.Parts.Add(messagePart);
325
messageDescription.
Body
.WrapperName = xmlName.EncodedName;
329
messageDescription.
Body
.WrapperName = TypeLoader.GetBodyWrapperResponseName(xmlName).EncodedName;
343
messageDescription.
Body
.ReturnValue = messagePart;
System\ServiceModel\ComIntegration\DispatchProxy.cs (15)
122
if (msgDesc.
Body
.ReturnValue != null)
124
if (string.IsNullOrEmpty(msgDesc.
Body
.ReturnValue.BaseType))
125
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new COMException(SR.GetString(SR.CannotResolveTypeForParamInMessageDescription, "ReturnValue", msgDesc.
Body
.WrapperName, msgDesc.
Body
.WrapperNamespace), HR.DISP_E_MEMBERNOTFOUND));
127
msgDesc.
Body
.ReturnValue.Type = Type.GetType(msgDesc.
Body
.ReturnValue.BaseType);
129
foreach (MessagePartDescription param in msgDesc.
Body
.Parts)
150
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new COMException(SR.GetString(SR.CannotResolveTypeForParamInMessageDescription, param.Name, msgDesc.
Body
.WrapperName, msgDesc.
Body
.WrapperNamespace), HR.DISP_E_MEMBERNOTFOUND));
222
ins = new object[mInfo.opDesc.Messages[0].
Body
.Parts.Count];
223
outs = new object[mInfo.opDesc.Messages[1].
Body
.Parts.Count];
226
if (mInfo.opDesc.Messages[0].
Body
.Parts.Count > 0)
228
for (int index = 0; index < mInfo.opDesc.Messages[0].
Body
.Parts.Count; index++)
231
if (!mInfo.opDesc.IsOneWay && (mInfo.opDesc.Messages[1].
Body
.Parts.Count > 0))
233
for (int index = 0; index < mInfo.opDesc.Messages[1].
Body
.Parts.Count; index++)
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)
System\ServiceModel\Description\DispatcherBuilder.cs (2)
73
messageDescription.
Body
.WrapperName = messageDescription.
Body
.WrapperNamespace = null;
System\ServiceModel\Description\MessageContractExporter.cs (17)
126
ExportAnyMessage(wsdlMessage, description.
Body
.ReturnValue ?? description.
Body
.Parts[0]);
613
foreach (MessagePartDescription part in message.
Body
.Parts)
627
foreach (MessagePartDescription part in message.
Body
.Parts)
728
ns = messageDescription.
Body
.WrapperNamespace;
970
bool isWrapped = description.
Body
.WrapperName != null;
973
wrapperSequence = ExportWrappedPart(wsdlMessage, description.
Body
.WrapperName, description.
Body
.WrapperNamespace, SchemaSet, false /*isOperationInherited*/);
975
if (OperationFormatter.IsValidReturnValue(description.
Body
.ReturnValue))
978
Type dataContractType = DataContractSerializerOperationFormatter.GetSubstituteDataContractType(description.
Body
.ReturnValue.Type, out isQueryable);
979
XmlQualifiedName typeName = ExportType(dataContractType, description.
Body
.ReturnValue.Name, operation.Name, out xsdType);
980
ExportMessagePart(wsdlMessage, description.
Body
.ReturnValue, typeName, xsdType, true/*isOptional*/, IsTypeNullable(description.
Body
.ReturnValue.Type), false/*isOperationInherited*/, dataContractFormatAttribute.Style != OperationFormatStyle.Rpc, description.
Body
.WrapperNamespace, wrapperSequence, SchemaSet);
983
foreach (MessagePartDescription bodyPart in description.
Body
.Parts)
988
ExportMessagePart(wsdlMessage, bodyPart, typeName, xsdType, true/*isOptional*/, IsTypeNullable(bodyPart.Type), false/*isOperationInherited*/, dataContractFormatAttribute.Style != OperationFormatStyle.Rpc, description.
Body
.WrapperNamespace, wrapperSequence, SchemaSet);
1118
bool isDocWrapped = !operationReflector.IsRpc && description.
Body
.WrapperName != null;
System\ServiceModel\Description\MessageContractImporter.cs (25)
502
if (isReturn && messageDescription.
Body
.ReturnValue == null)
503
messageDescription.
Body
.ReturnValue = partDesc;
505
messageDescription.
Body
.Parts.Add(partDesc);
508
if (isReply && messageDescription.
Body
.ReturnValue == null)
510
if (messageDescription.
Body
.Parts.Count > 0)
512
if (!CheckIsRef(operation.Messages[0], messageDescription.
Body
.Parts[0]))
514
messageDescription.
Body
.ReturnValue = messageDescription.
Body
.Parts[0];
515
messageDescription.
Body
.Parts.RemoveAt(0);
559
request.
Body
.WrapperName = operation.Name;
560
request.
Body
.WrapperNamespace = operation.DeclaringContract.Namespace;
567
response.
Body
.WrapperName = TypeLoader.GetBodyWrapperResponseName(operation.Name).EncodedName;
568
response.
Body
.WrapperNamespace = operation.DeclaringContract.Namespace;
697
description.
Body
.WrapperName = new XmlName(part.Element.Name, true /*isEncoded*/).EncodedName;
698
description.
Body
.WrapperNamespace = part.Element.Namespace;
737
messageDescription.
Body
.WrapperName = new XmlName(elementName.Name, true /*isEncoded*/).EncodedName;
738
messageDescription.
Body
.WrapperNamespace = elementName.Namespace;
743
if (isReply && messageDescription.
Body
.ReturnValue == null && !CheckIsRef(requestMessage, parts[0]))
745
messageDescription.
Body
.ReturnValue = parts[0];
751
messageDescription.
Body
.Parts.Add(part);
772
foreach (MessagePartDescription requestPart in requestMessage.
Body
.Parts)
1244
if (isReply && description.
Body
.ReturnValue == null)
1245
description.
Body
.ReturnValue = bodyPart;
1247
description.
Body
.Parts.Add(bodyPart);
1435
description.
Body
.WrapperNamespace = bodyBinding.Namespace;
System\ServiceModel\Description\MessageDescription.cs (9)
162
return (
Body
.ReturnValue != null &&
Body
.Parts.Count == 0 &&
Body
.ReturnValue.Type == TypeOfUntypedMessage) ||
163
(
Body
.ReturnValue == null &&
Body
.Parts.Count == 1 &&
Body
.Parts[0].Type == TypeOfUntypedMessage);
171
return !IsTypedMessage &&
Body
.Parts.Count == 0 && (
Body
.ReturnValue == null ||
Body
.ReturnValue.Type == typeof(void));
System\ServiceModel\Description\OperationDescription.cs (1)
256
(this.Messages[1].
Body
.Parts.Count > 0);
System\ServiceModel\Description\OperationGenerator.cs (40)
259
if (!this.Oneway && this.Response.
Body
.ReturnValue != null)
261
this.EndMethod.ReturnType = GetParameterType(this.Response.
Body
.ReturnValue);
262
ParameterizedMessageHelper.GenerateMessageParameterAttribute(this.Response.
Body
.ReturnValue, this.EndMethod.ReturnTypeCustomAttributes, TypeLoader.GetReturnValueName(this.DefaultName), this.DefaultNS);
263
AddAdditionalAttributes(this.Response.
Body
.ReturnValue, this.EndMethod.ReturnTypeCustomAttributes, this.IsEncoded);
319
if (this.MessageContractType == MessageContractType.BareMessageContract && message.
Body
.WrapperName != null)
334
if (isReply && message.
Body
.ReturnValue != null)
336
GenerateBodyPart(0, message.
Body
.ReturnValue, partCodeGenerator, true, this.IsEncoded, this.DefaultNS);
363
return (message.
Body
.Parts.Count == 0 && message.Headers.Count == 0);
608
if (messageDescription.
Body
.ReturnValue != null)
610
AddWrapperPart(messageDescription.MessageName, this.WrappedBodyTypeGenerator, partGenerator, messageDescription.
Body
.ReturnValue, wrapperTypeDecl.CustomAttributes);
611
protectionLevel = ProtectionLevelHelper.Max(protectionLevel, messageDescription.
Body
.ReturnValue.ProtectionLevel);
612
if (messageDescription.
Body
.ReturnValue.HasProtectionLevel)
617
foreach (MessagePartDescription part in messageDescription.
Body
.Parts)
631
messageDescription.
Body
.Parts.Clear();
633
MessagePartDescription wrapperPart = new MessagePartDescription(messageDescription.
Body
.WrapperName, messageDescription.
Body
.WrapperNamespace);
638
messageDescription.
Body
.WrapperName = null;
639
messageDescription.
Body
.WrapperNamespace = null;
641
messageDescription.
Body
.ReturnValue = wrapperPart;
643
messageDescription.
Body
.Parts.Add(wrapperPart);
653
if (messageDescription.
Body
.ReturnValue != null)
654
defaultNS = messageDescription.
Body
.ReturnValue.Namespace;
655
else if (messageDescription.
Body
.Parts.Count > 0)
656
defaultNS = messageDescription.
Body
.Parts[0].Namespace;
665
foreach (MessagePartDescription setting in this.Request.
Body
.Parts)
671
order = this.Response.
Body
.ReturnValue != null ? 1 : 0;
672
foreach (MessagePartDescription setting in this.Response.
Body
.Parts)
784
if (message.
Body
.WrapperName != null)
788
new CodePrimitiveExpression(NamingHelper.CodeName(message.
Body
.WrapperName))));
790
new CodePrimitiveExpression(message.
Body
.WrapperNamespace)));
906
if (parent.Request.
Body
.WrapperName == null || (parent.Response != null && parent.Response.
Body
.WrapperName == null))
909
if (!StringEqualOrNull(parent.Request.
Body
.WrapperNamespace, parent.ContractNS))
910
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ParameterModeException(SR.GetString(SR.SFxCannotImportAsParameters_DifferentWrapperNs, parent.Request.MessageName, parent.Request.
Body
.WrapperNamespace, parent.ContractNS)));
913
if (!String.Equals(parent.Request.
Body
.WrapperName, defaultName.EncodedName, StringComparison.Ordinal))
914
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ParameterModeException(SR.GetString(SR.SFxCannotImportAsParameters_DifferentWrapperName, parent.Request.MessageName, parent.Request.
Body
.WrapperName, defaultName.EncodedName)));
918
if (!StringEqualOrNull(parent.Response.
Body
.WrapperNamespace, parent.ContractNS))
919
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ParameterModeException(SR.GetString(SR.SFxCannotImportAsParameters_DifferentWrapperNs, parent.Response.MessageName, parent.Response.
Body
.WrapperNamespace, parent.ContractNS)));
921
if (!String.Equals(parent.Response.
Body
.WrapperName, TypeLoader.GetBodyWrapperResponseName(defaultName).EncodedName, StringComparison.Ordinal))
922
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ParameterModeException(SR.GetString(SR.SFxCannotImportAsParameters_DifferentWrapperName, parent.Response.MessageName, parent.Response.
Body
.WrapperName, defaultName.EncodedName)));
System\ServiceModel\Description\TypeLoader.cs (15)
1023
responseDescription.
Body
.WrapperName = responseDescription.
Body
.WrapperNamespace = null;
1028
requestDescription.
Body
.WrapperName = requestDescription.
Body
.WrapperNamespace = null;
1177
MessagePartDescriptionCollection partDescriptionCollection = messageDescription.
Body
.Parts;
1183
messageDescription.
Body
.Parts.Add(partDescription);
1188
messageDescription.
Body
.ReturnValue = CreateParameterPartDescription(returnValueName, defaultNS, 0, returnAttrProvider, returnType);
1192
messageDescription.
Body
.WrapperName = null;
1193
messageDescription.
Body
.WrapperNamespace = null;
1197
messageDescription.
Body
.WrapperName = wrapperName.EncodedName;
1198
messageDescription.
Body
.WrapperNamespace = wrapperNamespace;
1242
messageDescription.
Body
.WrapperName = GetWrapperName(messageContractAttribute.WrapperName, messageDescription.MessageName).EncodedName;
1243
messageDescription.
Body
.WrapperNamespace = messageContractAttribute.WrapperNamespace ?? defaultNS;
1345
messageDescription.
Body
.ReturnValue = CreateMessagePartDescription(typeof(void),
1353
AddSortedParts<MessagePartDescription>(bodyPartDescriptionList, messageDescription.
Body
.Parts);
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (8)
489
if (IsEncoded && message.IsTypedMessage && message.
Body
.WrapperName == null)
500
returnPart = OperationFormatter.IsValidReturnValue(message.
Body
.ReturnValue) ? message.
Body
.ReturnValue : null;
501
bodyParts = message.
Body
.Parts;
502
wrapperName = message.
Body
.WrapperName;
503
wrapperNs = message.
Body
.WrapperNamespace;
528
if (message.
Body
.Parts.Count != 1)
530
MessagePartDescription bodyPart = message.
Body
.Parts[0];
System\ServiceModel\Description\XmlSerializerOperationGenerator.cs (1)
129
MessageBodyDescription body = message.
Body
;
System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (3)
116
MessageBodyDescription body = messageDescription.
Body
;
126
if (IsValidReturnValue(messageDescription.
Body
.ReturnValue))
127
messageInfo.ReturnPart = CreatePartInfo(messageDescription.
Body
.ReturnValue, dataContractFormatAttribute.Style, serializerFactory);
System\ServiceModel\Dispatcher\OperationFormatter.cs (4)
40
int stringCount = 3 + requestDescription.
Body
.Parts.Count;
42
stringCount += 2 + replyDescription.
Body
.Parts.Count;
574
members = new MemberInfo[description.
Body
.Parts.Count + description.Properties.Count + description.Headers.Count];
582
foreach (MessagePartDescription part in description.
Body
.Parts)
System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (17)
54
int stringCount = 3 + requestMessage.
Body
.Parts.Count;
56
stringCount += 2 + responseMessage.
Body
.Parts.Count;
65
if (requestMessage.
Body
.WrapperName != null)
67
requestWrapperName = AddToDictionary(dictionary, requestMessage.
Body
.WrapperName);
68
requestWrapperNamespace = AddToDictionary(dictionary, requestMessage.
Body
.WrapperNamespace);
71
requestParts = AddToDictionary(dictionary, requestMessage.
Body
.Parts, isRpc);
75
if (responseMessage.
Body
.WrapperName != null)
77
responseWrapperName = AddToDictionary(dictionary, responseMessage.
Body
.WrapperName);
78
responseWrapperNamespace = AddToDictionary(dictionary, responseMessage.
Body
.WrapperNamespace);
81
responseParts = AddToDictionary(dictionary, responseMessage.
Body
.Parts, isRpc);
83
if (responseMessage.
Body
.ReturnValue != null && responseMessage.
Body
.ReturnValue.Type != typeof(void))
85
returnPart = AddToDictionary(dictionary, responseMessage.
Body
.ReturnValue, isRpc);
314
if (!AreTypesSupported(requestMessage.
Body
.Parts))
318
if (!AreTypesSupported(responseMessage.
Body
.Parts))
320
if (responseMessage.
Body
.ReturnValue != null && !IsTypeSupported(responseMessage.
Body
.ReturnValue))
System\ServiceModel\Dispatcher\StreamFormatter.cs (13)
36
if ((object)streamPart == (object)messageDescription.
Body
.ReturnValue)
40
wrapperName = messageDescription.
Body
.WrapperName;
41
wrapperNS = messageDescription.
Body
.WrapperNamespace;
185
if (messageDescription.
Body
.ReturnValue != null && messageDescription.
Body
.ReturnValue.Type == typeof(Stream))
187
foreach (MessagePartDescription part in messageDescription.
Body
.Parts)
197
if (OperationFormatter.IsValidReturnValue(messageDescription.
Body
.ReturnValue))
199
if (messageDescription.
Body
.Parts.Count == 0)
200
if (messageDescription.
Body
.ReturnValue.Type == typeof(Stream))
201
return messageDescription.
Body
.ReturnValue;
205
if (messageDescription.
Body
.Parts.Count == 1)
206
if (messageDescription.
Body
.Parts[0].Type == typeof(Stream))
207
return messageDescription.
Body
.Parts[0];
System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (7)
284
SerializeBody(writer, version, messageInfo.BodySerializer, messageDescription.
Body
.ReturnValue, messageDescription.
Body
.Parts, returnValue, parameters);
289
object bodyObject = parameters[messageDescription.
Body
.Parts[0].Index];
345
return DeserializeBody(reader, version, messageInfo.BodySerializer, messageDescription.
Body
.ReturnValue, messageDescription.
Body
.Parts, parameters, isRequest);
349
object bodyObject = Activator.CreateInstance(messageDescription.
Body
.Parts[0].Type);
364
parameters[messageDescription.
Body
.Parts[0].Index] = bodyObject;
System\ServiceModel\MsmqIntegration\MsmqIntegrationValidationBehavior.cs (3)
99
if ((message.
Body
.Parts.Count == 0) && (message.Headers.Count == 0))
103
if (message.
Body
.Parts.Count == 1) // Single MsmqMessage<> argument is also legal
105
Type type = message.
Body
.Parts[0].Type;
System\ServiceModel\Security\ChannelProtectionRequirements.cs (6)
267
if (message.
Body
.Parts.Count > 0)
273
else if (message.
Body
.ReturnValue != null)
275
if (!(message.
Body
.ReturnValue.GetType().Equals(typeof(MessagePartDescription))))
280
MessagePartDescription desc = message.
Body
.ReturnValue;
289
if (message.
Body
.Parts.Count > 0)
291
foreach (MessagePartDescription body in message.
Body
.Parts)
System\ServiceModel\Security\WSTrust.cs (4)
1258
if (message.
Body
.Parts.Count > 0)
1260
foreach (MessagePartDescription part in message.
Body
.Parts)
1265
if (OperationFormatter.IsValidReturnValue(message.
Body
.ReturnValue))
1267
message.
Body
.ReturnValue.ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign;
System.ServiceModel.Activities (80)
System\ServiceModel\Activities\ContractValidationHelper.cs (38)
224
if (targetMessage.
Body
== null)
232
if (targetMessage.
Body
.ReturnValue == null)
236
else if (!targetMessage.
Body
.ReturnValue.Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message)))
238
Constraint.AddValidationError(context, new ValidationError(SR2.FirstParameterDoesnotMatchTheReturnValue(declaredMessageType.FullName, targetMessage.
Body
.ReturnValue.Type.Name, operation.Name, operation.DeclaringContract.Name)));
243
if (targetMessage.
Body
.Parts.Count == 0)
247
else if (targetMessage.
Body
.Parts.Count > 1)
253
if (!targetMessage.
Body
.Parts[0].Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message)))
255
Constraint.AddValidationError(context, new ValidationError(SR2.MessageTypeMismatch(targetMessage.
Body
.Parts[0].Type.FullName, operation.Name, operation.DeclaringContract.Name)));
265
Fx.Assert(targetMessage.
Body
!= null, "MessageDescription.Body is never null!");
324
if (isResponse && targetMessage.
Body
.ReturnValue != null && targetMessage.
Body
.ReturnValue.Type != TypeHelper.VoidType)
326
if (targetMessage.
Body
.Parts.Count > 0)
330
targetPart = targetMessage.
Body
.ReturnValue;
334
if (targetMessage.
Body
.WrapperName != null && targetMessage.
Body
.WrapperName != String.Empty)
339
if (targetMessage.
Body
.WrapperNamespace != null && targetMessage.
Body
.WrapperNamespace != String.Empty)
344
if (targetMessage.
Body
.Parts.Count == 0)
348
else if (targetMessage.
Body
.Parts.Count > 1)
354
targetPart = targetMessage.
Body
.Parts[0];
395
MessageBodyDescription targetMessageBody = targetMessage.
Body
;
490
if (message.
Body
.Parts != null)
492
if (message.
Body
.Parts.Count != 0)
494
foreach (MessagePartDescription messagePart in message.
Body
.Parts)
522
if ((message.
Body
.ReturnValue != null && message.
Body
.ReturnValue.Type.IsDefined(typeof(MessageContractAttribute), false))
523
|| (message.
Body
.ReturnValue != null && message.
Body
.ReturnValue.Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message))))
529
if (operation.Messages[1].MessageType != null || operation.Messages[1].
Body
.ReturnValue.Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message)))
566
if (message.
Body
.ReturnValue != null && message.
Body
.ReturnValue.Type != typeof(void))
568
if (!message.
Body
.ReturnValue.Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message)))
579
if (message.
Body
.Parts != null)
581
if (message.
Body
.Parts.Count > 0)
583
MessagePartDescriptionCollection parts = message.
Body
.Parts;
611
else if (operation.Messages[0].
Body
.Parts != null
612
&& operation.Messages[0].
Body
.Parts.Count == 1
613
&& operation.Messages[0].
Body
.Parts[0].Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message)))
System\ServiceModel\Activities\MessageBuilder.cs (15)
129
result.
Body
.WrapperName = null;
130
result.
Body
.WrapperNamespace = null;
178
message.
Body
.Parts.Add(messagePart);
209
message.
Body
.Parts.Add(messagePart);
222
message.
Body
.ReturnValue = message.
Body
.Parts[0];
223
message.
Body
.Parts.RemoveAt(0);
227
message.
Body
.ReturnValue = new MessagePartDescription(operation.Name + TypeLoader.ReturnSuffix,
229
message.
Body
.ReturnValue.Type = TypeHelper.VoidType;
235
message.
Body
.WrapperName = operation.Name + (isResponse ? TypeLoader.ResponseSuffix : string.Empty);
236
message.
Body
.WrapperNamespace = operation.DeclaringContract.Namespace;
249
responseMessage.
Body
.WrapperName = null;
250
responseMessage.
Body
.WrapperNamespace = null;
255
requestMessage.
Body
.WrapperName = null;
256
requestMessage.
Body
.WrapperNamespace = null;
System\ServiceModel\Activities\Receive.cs (11)
531
if (message.
Body
.Parts != null)
533
if (message.
Body
.Parts.Count != 0)
535
foreach (MessagePartDescription messagePart in message.
Body
.Parts)
565
if (message.Direction == MessageDirection.Input && message.
Body
.Parts != null)
567
foreach (MessagePartDescription messagePart in message.
Body
.Parts)
587
content.DeclaredMessageType = message.
Body
.Parts[0].Type;
599
if ((message.
Body
.ReturnValue != null && message.
Body
.ReturnValue.Type.IsDefined(typeof(MessageContractAttribute), false))
600
|| (message.
Body
.ReturnValue != null && message.
Body
.ReturnValue.Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message))))
606
if (operation.Messages[1].MessageType != null || operation.Messages[1].
Body
.ReturnValue.Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message)))
System\ServiceModel\Activities\SendReply.cs (16)
288
if (message.
Body
.ReturnValue != null && message.
Body
.ReturnValue.Type != typeof(void))
290
if (!message.
Body
.ReturnValue.Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message)))
301
if (message.
Body
.Parts != null)
303
if (message.
Body
.Parts.Count > 0)
305
MessagePartDescriptionCollection parts = message.
Body
.Parts;
329
&& message.
Body
.ReturnValue != null
330
&& message.
Body
.ReturnValue.Type != typeof(void))
332
Argument returnArgument = InArgument.Create(message.
Body
.ReturnValue.Type, ArgumentDirection.In);
333
content.Parameters.Add(message.
Body
.ReturnValue.Name, (InArgument)returnArgument);
336
if (message.Direction == MessageDirection.Output && message.
Body
.Parts != null)
338
foreach (MessagePartDescription messagePart in message.
Body
.Parts)
354
content.DeclaredMessageType = message.
Body
.ReturnValue.Type;
379
else if (operation.Messages[0].
Body
.Parts != null
380
&& operation.Messages[0].
Body
.Parts.Count == 1
381
&& operation.Messages[0].
Body
.Parts[0].Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message)))
System.ServiceModel.Web (57)
System\ServiceModel\Description\WCFServiceClientProxyGenerator.cs (5)
114
int numMessageParts = requestMessage.
Body
.Parts.Count;
117
MessagePartDescription messagePart = requestMessage.
Body
.Parts[p];
133
if (responseMessage.
Body
.ReturnValue != null && responseMessage.
Body
.ReturnValue.Type != null)
136
serviceData.ProcessClientType(ReplaceMessageWithObject(responseMessage.
Body
.ReturnValue.Type), false, true);
System\ServiceModel\Description\WebHttpBehavior.cs (37)
434
return (message.
Body
.ReturnValue != null && message.
Body
.Parts.Count == 0 && message.
Body
.ReturnValue.Type == typeof(Message)) ||
435
(message.
Body
.ReturnValue == null && message.
Body
.Parts.Count == 1 && message.
Body
.Parts[0].Type == typeof(Message));
832
MessagePartDescriptionCollection bodyParameters = md.
Body
.Parts;
913
operationDescription.Messages[0].
Body
.Parts.Clear();
919
operationDescription.Messages[0].
Body
.Parts.Add(parts[i]);
925
operationDescription.Messages[0].
Body
.Parts.Clear();
928
operationDescription.Messages[0].
Body
.Parts.Add(originalParts[i]);
955
if (message.
Body
.Parts.Count > 1)
959
if (message.
Body
.Parts.Count == 1 && message.
Body
.Parts[0].Type != typeof(void))
961
type = message.
Body
.Parts[0].Type;
967
if (message.
Body
.Parts.Count > 0)
971
if (message.
Body
.ReturnValue != null && message.
Body
.ReturnValue.Type != typeof(void))
973
type = message.
Body
.ReturnValue.Type;
989
for (int i = 0; i < message.
Body
.Parts.Count; ++i)
991
if (typeof(Stream) == message.
Body
.Parts[i].Type)
993
type = message.
Body
.Parts[i].Type;
999
if (hasStream && message.
Body
.Parts.Count > 1)
1008
for (int i = 0; i < message.
Body
.Parts.Count; ++i)
1010
if (typeof(Stream) == message.
Body
.Parts[i].Type)
1012
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SR2.GetString(SR2.NoOutOrRefStreamParametersAllowed, message.
Body
.Parts[i].Name, declaringOperation.Name, declaringOperation.DeclaringContract.Name)));
1015
if (message.
Body
.ReturnValue != null && typeof(Stream) == message.
Body
.ReturnValue.Type)
1018
if (message.
Body
.Parts.Count > 0)
1022
type = message.
Body
.ReturnValue.Type;
1203
if (!IsUntypedMessage(operation.Messages[0]) && operation.Messages[0].
Body
.Parts.Count != 0)
1208
SR2.GetString(SR2.GETCannotHaveBody, operation.Name, operation.DeclaringContract.Name, operation.Messages[0].
Body
.Parts[0].Name)));
1246
foreach (MessagePartDescription description in md.
Body
.Parts)
1268
if (IsTypedMessage(md) && md.
Body
.WrapperName == null)
1270
if (md.
Body
.Parts.Count > 1)
1275
if (md.
Body
.Parts.Count == 1 && md.
Body
.Parts[0].Multiple)
System\ServiceModel\Description\WebScriptEnablingBehavior.cs (1)
193
(messageDescription.
Body
.Parts.Count > 0))
System\ServiceModel\Dispatcher\HelpPage.cs (3)
231
else if (od.Messages[1].
Body
.Parts.Count > 0)
238
return (od.Messages[1].
Body
.ReturnValue.Type);
260
from part in od.Messages[0].
Body
.Parts
System\ServiceModel\Dispatcher\UriTemplateClientFormatter.cs (3)
151
for (int i = 0; i < operationDescription.Messages[0].
Body
.Parts.Count; ++i)
153
MessagePartDescription mpd = operationDescription.Messages[0].
Body
.Parts[i];
210
foreach (MessagePartDescription mpd in od.Messages[0].
Body
.Parts)
System\ServiceModel\Web\WebServiceHost.cs (8)
289
if (message.
Body
.Parts.Count == 0)
293
else if (message.
Body
.Parts.Count == 1)
295
if (IsStreamPart(message.
Body
.Parts[0].Type))
300
else if (IsVoidPart(message.
Body
.Parts[0].Type))
319
if (message.
Body
.Parts.Count == 0)
321
if (message.
Body
.ReturnValue == null || IsVoidPart(message.
Body
.ReturnValue.Type))
325
else if (IsStreamPart(message.
Body
.ReturnValue.Type))