Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System.ServiceModel.Dispatcher;
using System.ServiceModel.Channels;
namespace RoyalMail
{
public class RoyalMailMessageFormatter : IClientMessageFormatter
{
private readonly IClientMessageFormatter formatter;
public RoyalMailMessageFormatter(IClientMessageFormatter formatter)
{
this.formatter = formatter;
}
public object DeserializeReply(Message message, object[] parameters)
{
return this.formatter.DeserializeReply(message, parameters);
}
public Message SerializeRequest(MessageVersion messageVersion, object[] parameters)
{
var message = this.formatter.SerializeRequest(messageVersion, parameters);
return new RoyalMailMessage(message);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment