153 references to Parts
System.ServiceModel (76)
System\ServiceModel\Channels\SecurityBindingElementImporter.cs (3)
280foreach (MessagePartDescription body in message.Body.Parts) 284if (!OperationFormatter.IsValidReturnValue(message.Body.ReturnValue) || message.Body.Parts.Count == 0) 433foreach (MessagePartDescription body in message.Body.Parts)
System\ServiceModel\ComIntegration\ComPlusTypeLoader.cs (1)
319messageDescription.Body.Parts.Add(messagePart);
System\ServiceModel\ComIntegration\DispatchProxy.cs (7)
129foreach (MessagePartDescription param in msgDesc.Body.Parts) 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 (2)
89foreach (MessagePartDescription part in message.Body.Parts) 160foreach (MessagePartDescription bodyPart in messageDescription.Body.Parts)
System\ServiceModel\Description\MessageBodyDescription.cs (2)
30foreach (MessagePartDescription mpd in other.Parts) 32this.Parts.Add(mpd.Clone());
System\ServiceModel\Description\MessageContractExporter.cs (4)
126ExportAnyMessage(wsdlMessage, description.Body.ReturnValue ?? description.Body.Parts[0]); 613foreach (MessagePartDescription part in message.Body.Parts) 627foreach (MessagePartDescription part in message.Body.Parts) 983foreach (MessagePartDescription bodyPart in description.Body.Parts)
System\ServiceModel\Description\MessageContractImporter.cs (8)
505messageDescription.Body.Parts.Add(partDesc); 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); 751messageDescription.Body.Parts.Add(part); 772foreach (MessagePartDescription requestPart in requestMessage.Body.Parts) 1247description.Body.Parts.Add(bodyPart);
System\ServiceModel\Description\MessageDescription.cs (4)
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 (8)
363return (message.Body.Parts.Count == 0 && message.Headers.Count == 0); 617foreach (MessagePartDescription part in messageDescription.Body.Parts) 631messageDescription.Body.Parts.Clear(); 643messageDescription.Body.Parts.Add(wrapperPart); 655else if (messageDescription.Body.Parts.Count > 0) 656defaultNS = messageDescription.Body.Parts[0].Namespace; 665foreach (MessagePartDescription setting in this.Request.Body.Parts) 672foreach (MessagePartDescription setting in this.Response.Body.Parts)
System\ServiceModel\Description\TypeLoader.cs (3)
1177MessagePartDescriptionCollection partDescriptionCollection = messageDescription.Body.Parts; 1183messageDescription.Body.Parts.Add(partDescription); 1353AddSortedParts<MessagePartDescription>(bodyPartDescriptionList, messageDescription.Body.Parts);
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (3)
501bodyParts = message.Body.Parts; 528if (message.Body.Parts.Count != 1) 530MessagePartDescription bodyPart = message.Body.Parts[0];
System\ServiceModel\Description\XmlSerializerOperationGenerator.cs (1)
134foreach (MessagePartDescription part in body.Parts)
System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (1)
122MessagePartDescriptionCollection parts = body.Parts;
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 (6)
54int stringCount = 3 + requestMessage.Body.Parts.Count; 56stringCount += 2 + responseMessage.Body.Parts.Count; 71requestParts = AddToDictionary(dictionary, requestMessage.Body.Parts, isRpc); 81responseParts = AddToDictionary(dictionary, responseMessage.Body.Parts, isRpc); 314if (!AreTypesSupported(requestMessage.Body.Parts)) 318if (!AreTypesSupported(responseMessage.Body.Parts))
System\ServiceModel\Dispatcher\StreamFormatter.cs (5)
187foreach (MessagePartDescription part in messageDescription.Body.Parts) 199if (messageDescription.Body.Parts.Count == 0) 205if (messageDescription.Body.Parts.Count == 1) 206if (messageDescription.Body.Parts[0].Type == typeof(Stream)) 207return messageDescription.Body.Parts[0];
System\ServiceModel\Dispatcher\XmlSerializerOperationFormatter.cs (5)
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 (3)
267if (message.Body.Parts.Count > 0) 289if (message.Body.Parts.Count > 0) 291foreach (MessagePartDescription body in message.Body.Parts)
System\ServiceModel\Security\WSTrust.cs (2)
1258if (message.Body.Parts.Count > 0) 1260foreach (MessagePartDescription part in message.Body.Parts)
System.ServiceModel.Activities (37)
System\ServiceModel\Activities\ContractValidationHelper.cs (19)
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))); 326if (targetMessage.Body.Parts.Count > 0) 344if (targetMessage.Body.Parts.Count == 0) 348else if (targetMessage.Body.Parts.Count > 1) 354targetPart = targetMessage.Body.Parts[0]; 437foreach (MessagePartDescription targetPart in targetMessageBody.Parts) 466if (!targetMessageBody.Parts.Contains(qName)) 490if (message.Body.Parts != null) 492if (message.Body.Parts.Count != 0) 494foreach (MessagePartDescription messagePart in message.Body.Parts) 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 (4)
178message.Body.Parts.Add(messagePart); 209message.Body.Parts.Add(messagePart); 222message.Body.ReturnValue = message.Body.Parts[0]; 223message.Body.Parts.RemoveAt(0);
System\ServiceModel\Activities\Receive.cs (6)
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;
System\ServiceModel\Activities\SendReply.cs (8)
301if (message.Body.Parts != null) 303if (message.Body.Parts.Count > 0) 305MessagePartDescriptionCollection parts = message.Body.Parts; 336if (message.Direction == MessageDirection.Output && message.Body.Parts != null) 338foreach (MessagePartDescription messagePart in message.Body.Parts) 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 (40)
System\ServiceModel\Description\WCFServiceClientProxyGenerator.cs (2)
114int numMessageParts = requestMessage.Body.Parts.Count; 117MessagePartDescription messagePart = requestMessage.Body.Parts[p];
System\ServiceModel\Description\WebHttpBehavior.cs (27)
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) 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))); 1018if (message.Body.Parts.Count > 0) 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) 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 (2)
231else if (od.Messages[1].Body.Parts.Count > 0) 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 (5)
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)