This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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