internal override void ConfigureInternalReceiveReply(InternalReceiveMessage internalReceiveMessage, out FromReply responseFormatter) { responseFormatter = new FromReply(); foreach (KeyValuePair <string, OutArgument> parameter in this.Parameters) { responseFormatter.Parameters.Add(OutArgument.CreateReference(parameter.Value, parameter.Key)); } }
internal override void ConfigureInternalReceive(InternalReceiveMessage internalReceiveMessage, out FromRequest requestFormatter) { if (this.InternalDeclaredMessageType == MessageDescription.TypeOfUntypedMessage) { internalReceiveMessage.Message = new OutArgument <Message>(context => ((OutArgument <Message>) this.Message).Get(context)); requestFormatter = null; } else { requestFormatter = new FromRequest(); if (this.Message != null) { requestFormatter.Parameters.Add(OutArgument.CreateReference(this.Message, "Message")); } } }
internal override void ConfigureInternalReceiveReply(InternalReceiveMessage internalReceiveMessage, out FromReply responseFormatter) { if (this.InternalDeclaredMessageType == MessageDescription.TypeOfUntypedMessage) { internalReceiveMessage.Message = new OutArgument <System.ServiceModel.Channels.Message>(context => ((OutArgument <System.ServiceModel.Channels.Message>) this.Message).Get(context)); responseFormatter = null; } else { responseFormatter = new FromReply(); if (MessageBuilder.IsMessageContract(this.InternalDeclaredMessageType)) { responseFormatter.Result = OutArgument.CreateReference(this.Message, "Message"); } else if (this.Message != null) { responseFormatter.Parameters.Add(OutArgument.CreateReference(this.Message, "Message")); } } }
internal override void ConfigureInternalReceiveReply(InternalReceiveMessage internalReceiveMessage, out FromReply responseFormatter) { if (this.InternalDeclaredMessageType == MessageDescription.TypeOfUntypedMessage) { // do not use the formatter in this case internalReceiveMessage.Message = new OutArgument <Message>(context => ((OutArgument <Message>) this.Message).Get(context)); responseFormatter = null; } else { responseFormatter = new FromReply(); // WCF rule dictates that MessageContract must be bound to ReturnValue, not Parameters if (MessageBuilder.IsMessageContract(this.InternalDeclaredMessageType)) { responseFormatter.Result = OutArgument.CreateReference(this.Message, "Message"); } else if (this.Message != null) { responseFormatter.Parameters.Add(OutArgument.CreateReference(this.Message, "Message")); } } }