295 references to Messages
System.ServiceModel (138)
System\ServiceModel\Administration\ContractInstanceProvider.cs (5)
64Fx.Assert(operationDescription.Messages.Count > 0, ""); 77operation.SetProperty(AdministrationStrings.Action, FixWildcardAction(operationDescription.Messages[0].Action)); 78if (operationDescription.Messages.Count > 1) 80operation.SetProperty(AdministrationStrings.ReplyAction, FixWildcardAction(operationDescription.Messages[1].Action)); 101operation.SetProperty(AdministrationStrings.IsCallback, operationDescription.Messages[0].Direction == MessageDirection.Output);
System\ServiceModel\Channels\MessageEncodingBindingElementImporter.cs (2)
53for (int i = 0; i < operation.Messages.Count; i++) 55MessageDescription message = operation.Messages[i];
System\ServiceModel\Channels\SecurityBindingElement.cs (2)
2342foreach (MessageDescription message in operation.Messages) 2409foreach (MessageDescription message in operation.Messages)
System\ServiceModel\Channels\SecurityBindingElementImporter.cs (3)
52foreach (MessageDescription message in operation.Messages) 267foreach (MessageDescription message in operation.Messages) 427foreach (MessageDescription message in operation.Messages)
System\ServiceModel\ComIntegration\ComPlusTypeLoader.cs (2)
242operationDescription.Messages.Add(inMessage); 243operationDescription.Messages.Add(outMessage);
System\ServiceModel\ComIntegration\DispatchProxy.cs (8)
117foreach (MessageDescription msgDesc in opDesc.Messages) 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++) 238action = mInfo.opDesc.Messages[0].Action;
System\ServiceModel\Configuration\UnrecognizedPolicyAssertionElement.cs (1)
87foreach (MessageDescription message in operation.Messages)
System\ServiceModel\Description\DataContractSerializerOperationBehavior.cs (3)
113MessageDescription request = operation.Messages[0]; 115if (operation.Messages.Count == 2) 116response = operation.Messages[1];
System\ServiceModel\Description\DataContractSerializerOperationGenerator.cs (2)
87foreach (MessageDescription message in context.Operation.Messages) 154foreach (MessageDescription messageDescription in operation.Messages)
System\ServiceModel\Description\DispatcherBuilder.cs (8)
71foreach (MessageDescription messageDescription in operationDesc.Messages) 974if (operation.Messages.Count == 1) 976child = new ClientOperation(parent, operation.Name, operation.Messages[0].Action); 980child = new ClientOperation(parent, operation.Name, operation.Messages[0].Action, 981operation.Messages[1].Action); 1003string requestAction = operation.Messages[0].Action; 1011string replyAction = operation.Messages[1].Action; 1084MessageDescription first = operation.Messages[0];
System\ServiceModel\Description\ImportedPolicyConversionContext.cs (1)
53foreach (MessageDescription messageDescription in operationDescription.Messages)
System\ServiceModel\Description\MessageContractExporter.cs (10)
103for (int messageIndex = 0; messageIndex < operation.Messages.Count; messageIndex++) 119MessageDescription description = operation.Messages[messageIndex]; 625foreach (MessageDescription message in operation.Messages) 683soapOperationBinding.SoapAction = operation.Messages[0].Action; 685foreach (MessageDescription message in operation.Messages) 935MessageDescription description = operation.Messages[messageIndex]; 965MessageDescription description = operation.Messages[messageIndex]; 1071MessageDescription description = operation.Messages[messageIndex]; 1099MessageDescription description = operation.Messages[messageIndex]; 1122AddParameterOrder(operation.Messages[messageIndex]);
System\ServiceModel\Description\MessageContractImporter.cs (5)
280foreach (MessageDescription message in operation.Messages) 315foreach (MessageDescription message in operation.Messages) 482if (areAllMessagesWrapped && TryImportWrappedMessage(messageDescription, operation.Messages[0], wsdlMessage, isReply)) 512if (!CheckIsRef(operation.Messages[0], messageDescription.Body.Parts[0])) 553MessageDescriptionCollection messages = operation.Messages;
System\ServiceModel\Description\MetadataImporter.cs (1)
116foreach (MessageDescription message in operation.Messages)
System\ServiceModel\Description\OperationDescription.cs (6)
176get { return this.Messages.Count == 1; } 189return Messages[0].Direction == MessageDirection.Output; 255return (this.Messages.Count > 1) && 256(this.Messages[1].Body.Parts.Count > 0); 268if (this.Messages.Count != 1 && this.Messages.Count != 2)
System\ServiceModel\Description\OperationGenerator.cs (2)
136this.Request = context.Operation.Messages[0]; 137this.Response = this.Oneway ? null : context.Operation.Messages[1];
System\ServiceModel\Description\TypedMessageConverter.cs (1)
70operation.Messages.Add(message);
System\ServiceModel\Description\TypeLoader.cs (23)
190operation.Messages.Add(message); 206operation.Messages.Add(request); 207operation.Messages.Add(reply); 731if (existingOp.Messages[0].Direction == op.Messages[0].Direction) 826if (existingOp.Messages[0].Direction == direction) 971operationDescription.Messages.Add(requestDescription); 1002operationDescription.Messages.Add(responseDescription); 1647if (this.syncOperation.Messages.Count != this.asyncOperation.Messages.Count) 1662for (int index = 0; index < this.syncOperation.Messages.Count; ++index) 1664if (this.syncOperation.Messages[index].Action != this.asyncOperation.Messages[index].Action) 1767if (this.syncOperation.Messages.Count != this.taskOperation.Messages.Count) 1781for (int index = 0; index < this.syncOperation.Messages.Count; ++index) 1783if (this.syncOperation.Messages[index].Action != this.taskOperation.Messages[index].Action) 1890if (this.taskOperation.Messages.Count != this.asyncOperation.Messages.Count) 1905for (int index = 0; index < this.taskOperation.Messages.Count; ++index) 1907if (this.taskOperation.Messages[index].Action != this.asyncOperation.Messages[index].Action)
System\ServiceModel\Description\WsdlExporter.cs (5)
68foreach (MessageDescription message in operation.Messages) 192foreach (MessageDescription message in operation.Messages) 427for (int i = 0; i < operation.Messages.Count; i++) 429if (operation.Messages[i].Action == MessageHeaders.WildcardAction) 767foreach (MessageDescription message in operation.Messages)
System\ServiceModel\Description\WsdlImporter.cs (9)
391for (int i = 0; i < operation.Messages.Count; i++) 393MessageDescription message = operation.Messages[i]; 512operationDescription.Messages.Add(messageDescription); 1002if (operationDescription.Messages.Count > 2) 1006if (FindMessage(operationDescription.Messages, MessageDirection.Output) != (wsdlOperationBinding.Output != null)) 1010if (FindMessage(operationDescription.Messages, MessageDirection.Input) != (wsdlOperationBinding.Input != null)) 1650foreach (MessageDescription message in operation.Messages) 1684foreach (MessageDescription message in operation.Messages) 2236foreach (MessageDescription message in operation.Messages)
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (8)
300this.IsOneWay = operation.Messages.Count == 1; 302this.RequestRequiresSerialization = !operation.Messages[0].IsUntypedMessage; 303this.ReplyRequiresSerialization = !this.IsOneWay && !operation.Messages[1].IsUntypedMessage; 319foreach (MessageDescription message in operation.Messages) 392this.request = CreateMessageInfo(this.Operation.Messages[0], ":Request"); 394throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.SFxRpcMessageBodyPartNameInvalid, Operation.Name, this.Operation.Messages[0].MessageName, request.BodyMapping.XsdElementName, this.Operation.Name))); 397this.reply = CreateMessageInfo(this.Operation.Messages[1], ":Response"); 400throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.SFxRpcMessageBodyPartNameInvalid, Operation.Name, this.Operation.Messages[1].MessageName, reply.BodyMapping.XsdElementName, responseName.EncodedName)));
System\ServiceModel\Description\XmlSerializerOperationGenerator.cs (1)
123foreach (MessageDescription message in context.Operation.Messages)
System\ServiceModel\Diagnostics\ServiceModelPerformanceCounters.cs (6)
41Fx.Assert(null != opDescription.Messages, "OperationDescription.Messages should not be null"); 42Fx.Assert(opDescription.Messages.Count > 0, "OperationDescription.Messages should not be empty"); 43Fx.Assert(null != opDescription.Messages[0], "OperationDescription.Messages[0] should not be null"); 44if (null != opDescription.Messages[0].Action && !this.actionToOperation.Keys.Contains(opDescription.Messages[0].Action)) 46this.actionToOperation.Add(opDescription.Messages[0].Action, opDescription.Name);
System\ServiceModel\Dispatcher\OperationFormatter.cs (7)
36this.requestDescription = description.Messages[0]; 37if (description.Messages.Count == 2) 38this.replyDescription = description.Messages[1]; 497for (int i = 0; i < operation.Messages.Count; i++) 499MessageDescription message = operation.Messages[i]; 524actionString = description.Messages[0].Action; 528replyActionString = description.Messages[1].Action;
System\ServiceModel\Dispatcher\OperationSelectorBehavior.cs (1)
46if (operation.Messages[0].Direction == directionThatRequiresClientOpSelection)
System\ServiceModel\Dispatcher\PeerValidationBehavior.cs (1)
35if (operation.Messages.Count > 1) // Request-reply
System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (6)
50this.requestMessage = description.Messages[0]; 51if (description.Messages.Count == 2) 52this.responseMessage = description.Messages[1]; 294MessageDescription requestMessage = description.Messages[0]; 296if (description.Messages.Count == 2) 297responseMessage = description.Messages[1];
System\ServiceModel\Dispatcher\SecurityValidationBehavior.cs (1)
449foreach (MessageDescription message in operation.Messages)
System\ServiceModel\MsmqIntegration\MsmqIntegrationValidationBehavior.cs (1)
97MessageDescription message = operation.Messages[0];
System\ServiceModel\Security\ChannelProtectionRequirements.cs (1)
240foreach (MessageDescription message in operation.Messages)
System\ServiceModel\Security\WSSecurityPolicy.cs (3)
1361foreach (MessageDescription message in operation.Messages) 3004for (int k = 0; k < operation.Messages.Count; ++k) 3006MessageDescription message = operation.Messages[k];
System\ServiceModel\Security\WSTrust.cs (1)
1256foreach (MessageDescription message in operation.Messages)
System\ServiceModel\TransactionFlowAttribute.cs (2)
65dictionary[new DirectionalAction(description.Messages[0].Direction, description.Messages[0].Action)] = this.transactions;
System.ServiceModel.Activities (67)
System\ServiceModel\Activities\ClientOperationFormatterProvider.cs (1)
46System.ServiceModel.Dispatcher.ClientOperation clientOperation = new System.ServiceModel.Dispatcher.ClientOperation(DummyClientRuntime, operationDescription.Name, operationDescription.Messages[0].Action);
System\ServiceModel\Activities\ContractInferenceHelper.cs (19)
118operation.Messages.Add(message); 145operation.Messages.Add(request); 146operation.Messages.Add(reply); 220operation.Messages.Add(request); 221operation.Messages.Add(reply); 344Fx.Assert(operation.Messages.Count == 0, "Operation already has input message"); 350operation.Messages.Add(message); 356Fx.Assert(operation.Messages.Count == 0, "Operation already has input message"); 362operation.Messages.Add(message); 367Fx.Assert(operation.Messages.Count > 0, "Operation does not have input message"); 368Fx.Assert(operation.Messages.Count < 2, "Operation already has output message"); 374operation.Messages.Add(message); 380Fx.Assert(operation.Messages.Count > 0, "Operation does not have input message"); 381Fx.Assert(operation.Messages.Count < 2, "Operation already has output message"); 387operation.Messages.Add(message); 527Fx.Assert(operation.Messages.Count == 2, "OperationDescription must be two-way for CorrectOutMessageForOperation to be invoked!"); 528operation.Messages.RemoveAt(1); 656string action = !isResponse ? operation.Messages[0].Action : operation.Messages[1].Action;
System\ServiceModel\Activities\ContractValidationHelper.cs (10)
485message = operation.Messages[0]; 527else if (operation.Messages.Count > 1) 529if (operation.Messages[1].MessageType != null || operation.Messages[1].Body.ReturnValue.Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message))) 559if (operation.Messages.Count > 1) 561message = operation.Messages[1]; 607else if (operation.Messages[0].MessageType != null) 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\Description\CorrelationQueryBehavior.cs (2)
222inAction = operation.Messages[0].Action; 227outAction = operation.Messages[1].Action;
System\ServiceModel\Activities\InternalSendMessage.cs (2)
3251EqualsOrdered(o1.Messages, o2.Messages, (m1, m2) => IsMessageDescriptionEquivalent(m1, m2)));
System\ServiceModel\Activities\MessageBuilder.cs (2)
244MessageDescription requestMessage = operation.Messages[0]; 245MessageDescription responseMessage = operation.Messages[1];
System\ServiceModel\Activities\Receive.cs (7)
499if (operation.Messages != null && operation.Messages.Count > 0) 501receiveActivity.Action = operation.Messages[0].Action; 526message = operation.Messages[0]; 604else if (operation.Messages.Count > 1) 606if (operation.Messages[1].MessageType != null || operation.Messages[1].Body.ReturnValue.Type.IsAssignableFrom(typeof(System.ServiceModel.Channels.Message)))
System\ServiceModel\Activities\ReceiveMessageContent.cs (4)
190Fx.Assert(targetOperation.Messages.Count >= 1, "There must be at least one MessageDescription in an OperationDescription!"); 191targetMessage = targetOperation.Messages[0]; 203Fx.Assert(targetOperation.Messages.Count == 2, "There must be exactly two MessageDescription objects for a two-way operation!"); 204targetMessage = targetOperation.Messages[1];
System\ServiceModel\Activities\ReceiveParametersContent.cs (4)
160Fx.Assert(targetOperation.Messages.Count >= 1, "There must be at least one MessageDescription in an OperationDescription!"); 161targetMessage = targetOperation.Messages[0]; 170Fx.Assert(targetOperation.Messages.Count == 2, "There must be exactly two MessageDescription objects for a two-way operation!"); 171targetMessage = targetOperation.Messages[1];
System\ServiceModel\Activities\SendMessageContent.cs (4)
205Fx.Assert(targetOperation.Messages.Count >= 1, "There must be at least one MessageDescription in an OperationDescription!"); 206targetMessage = targetOperation.Messages[0]; 218Fx.Assert(targetOperation.Messages.Count == 2, "There must be exactly two MessageDescription objects for a two-way operation!"); 219targetMessage = targetOperation.Messages[1];
System\ServiceModel\Activities\SendParametersContent.cs (4)
179Fx.Assert(targetOperation.Messages.Count >= 1, "There must be at least one MessageDescription in an OperationDescription!"); 180targetMessage = targetOperation.Messages[0]; 189Fx.Assert(targetOperation.Messages.Count == 2, "There must be exactly two MessageDescription objects for a two-way operation!"); 190targetMessage = targetOperation.Messages[1];
System\ServiceModel\Activities\SendReply.cs (7)
276if (operation.Messages.Count > 1) 279reply.Action = operation.Messages[1].Action; 282message = operation.Messages[1]; 374else if (operation.Messages[0].MessageType != null) 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\Activities\ServiceOperationFormatterProvider.cs (1)
36System.ServiceModel.Dispatcher.DispatchOperation dispatchOperation = new System.ServiceModel.Dispatcher.DispatchOperation(DummyDispatchRuntime, operationDescription.Name, operationDescription.Messages[0].Action);
System.ServiceModel.Web (89)
System\ServiceModel\Description\WCFServiceClientProxyGenerator.cs (3)
111MessageDescription requestMessage = operation.Messages[0]; 127if (operation.Messages.Count > 1) 130MessageDescription responseMessage = operation.Messages[1];
System\ServiceModel\Description\WebHttpBehavior.cs (65)
133cop.DeserializeReply = od.Messages.Count > 1 && !IsUntypedMessage(od.Messages[1]); 189if (od.Messages[0].Direction == MessageDirection.Input 190&& od.Messages[0].Action == WildcardAction) 279dop.SerializeReply = od.Messages.Count > 1 && (replyDispatch != null); 560if (operationDescription.Messages.Count < 2) 566if (TryGetStreamParameterType(operationDescription.Messages[1], operationDescription, false, out type)) 570if (IsUntypedMessage(operationDescription.Messages[1])) 582MessageDescription temp = operationDescription.Messages[0]; 583operationDescription.Messages[0] = MakeDummyMessageDescription(MessageDirection.Input); 586operationDescription.Messages[0] = temp; 594return IsBareResponse(style) && TryGetNonMessageParameterType(operationDescription.Messages[1], operationDescription, false, out parameterType); 599if (operationDescription.Messages.Count < 2) 613if (TryGetStreamParameterType(operationDescription.Messages[1], operationDescription, false, out type)) 617else if (IsUntypedMessage(operationDescription.Messages[1])) 637MessageDescription temp = operationDescription.Messages[0]; 638operationDescription.Messages[0] = MakeDummyMessageDescription(MessageDirection.Input); 644operationDescription.Messages[0] = temp; 685if (TryGetStreamParameterType(operationDescription.Messages[0], operationDescription, true, out parameterType)) 699isUntypedWhenUriParamsNotConsidered = IsUntypedMessage(operationDescription.Messages[0]); 703if (IsUntypedMessage(operationDescription.Messages[0])) 709else if (IsTypedMessage(operationDescription.Messages[0])) 757if (TryGetStreamParameterType(operationDescription.Messages[0], operationDescription, true, out type)) 776if (IsUntypedMessage(operationDescription.Messages[0])) 781else if (IsTypedMessage(operationDescription.Messages[0])) 808MessageDescription originalRequest = operationDescription.Messages[0]; 809bool thereIsAReply = operationDescription.Messages.Count > 1; 810MessageDescription originalReply = thereIsAReply ? operationDescription.Messages[1] : null; 811operationDescription.Messages[0] = originalRequest.Clone(); 814operationDescription.Messages[1] = originalReply.Clone(); 817operationDescription.Messages[0] = originalRequest; 820operationDescription.Messages[1] = originalReply; 827return IsBareRequest(style) && TryGetNonMessageParameterType(operationDescription.Messages[0], operationDescription, true, out parameterType); 851if (IsTypedMessage(operationDescription.Messages[0])) 858SR2.GetString(SR2.GETCannotHaveMCParameter, operationDescription.Name, operationDescription.DeclaringContract.Name, operationDescription.Messages[0].MessageType.Name))); 867if (IsUntypedMessage(operationDescription.Messages[0])) 886if (operationDescription.Messages.Count > 1) 888temp = operationDescription.Messages[1]; 889operationDescription.Messages[1] = MakeDummyMessageDescription(MessageDirection.Output); 892if (operationDescription.Messages.Count > 1) 894operationDescription.Messages[1] = temp; 911Collection<MessagePartDescription> originalParts = CloneParts(operationDescription.Messages[0]); 912Collection<MessagePartDescription> parts = CloneParts(operationDescription.Messages[0]); 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]); 1038TryGetStreamParameterType(operation.Messages[0], operation, true, out dummy); 1042if (operation.Messages.Count > 1) 1044TryGetStreamParameterType(operation.Messages[1], operation, false, out dummy); 1191TryGetNonMessageParameterType(operation.Messages[0], operation, true, out dummy); 1193if (!request && operation.Messages.Count > 1 && IsBareResponse(style)) 1195TryGetNonMessageParameterType(operation.Messages[1], operation, false, out dummy); 1203if (!IsUntypedMessage(operation.Messages[0]) && operation.Messages[0].Body.Parts.Count != 0) 1205if (!IsTypedMessage(operation.Messages[0])) 1208SR2.GetString(SR2.GETCannotHaveBody, operation.Name, operation.DeclaringContract.Name, operation.Messages[0].Body.Parts[0].Name))); 1213SR2.GetString(SR2.GETCannotHaveMCParameter, operation.Name, operation.DeclaringContract.Name, operation.Messages[0].MessageType.Name))); 1224ValidateNoMessageContractHeaders(od.Messages[0], od.Name, endpoint.Contract.Name); 1225ValidateNoBareMessageContractWithMultipleParts(od.Messages[0], od.Name, endpoint.Contract.Name); 1226ValidateNoMessageContractWithStream(od.Messages[0], od.Name, endpoint.Contract.Name); 1227if (od.Messages.Count > 1) 1229ValidateNoMessageContractHeaders(od.Messages[1], od.Name, endpoint.Contract.Name); 1230ValidateNoBareMessageContractWithMultipleParts(od.Messages[1], od.Name, endpoint.Contract.Name); 1231ValidateNoMessageContractWithStream(od.Messages[1], od.Name, endpoint.Contract.Name);
System\ServiceModel\Description\WebScriptEnablingBehavior.cs (3)
189foreach (MessageDescription messageDescription in operation.Messages) 302DispatchOperation dispatchOperation = new DispatchOperation(metadataEndpointDispatcher.DispatchRuntime, metadataOperation.Name, metadataOperation.Messages[0].Action, metadataOperation.Messages[1].Action);
System\ServiceModel\Dispatcher\HelpPage.cs (9)
223if (WebHttpBehavior.IsUntypedMessage(od.Messages[1])) 227else if (WebHttpBehavior.IsTypedMessage(od.Messages[1])) 229return od.Messages[1].MessageType; 231else if (od.Messages[1].Body.Parts.Count > 0) 238return (od.Messages[1].Body.ReturnValue.Type); 248else if (WebHttpBehavior.IsUntypedMessage(od.Messages[0])) 252else if (WebHttpBehavior.IsTypedMessage(od.Messages[0])) 254return od.Messages[0].MessageType; 260from part in od.Messages[0].Body.Parts
System\ServiceModel\Dispatcher\UriTemplateClientFormatter.cs (4)
151for (int i = 0; i < operationDescription.Messages[0].Body.Parts.Count; ++i) 153MessagePartDescription mpd = operationDescription.Messages[0].Body.Parts[i]; 207if (!WebHttpBehavior.IsUntypedMessage(od.Messages[0])) 210foreach (MessagePartDescription mpd in od.Messages[0].Body.Parts)
System\ServiceModel\Dispatcher\WebHttpDispatchOperationSelector.cs (1)
69if (od.Messages[0].Direction == MessageDirection.Input)
System\ServiceModel\Web\WebServiceHost.cs (4)
249if (operation.Messages.Count > 1 & !IsResponseStreamOrVoid(operation, ref numStreamOperations)) 284MessageDescription message = operation.Messages[0]; 310if (operation.Messages.Count <= 1) 314MessageDescription message = operation.Messages[1];
System.WorkflowServices (1)
System\ServiceModel\Description\WorkflowServiceBehavior.cs (1)
398provider.InitiatingActions.Add(operation.Messages[0].Action);