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