Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
using System.ServiceModel.Channels;
namespace RoyalMail
{
public class RoyalMailOperationBehavior : IOperationBehavior
{
public RoyalMailOperationBehavior() { }
public void ApplyClientBehavior(OperationDescription description, ClientOperation proxy)
{
IClientMessageFormatter currentFormatter = proxy.Formatter;
proxy.Formatter = new RoyalMailMessageFormatter(currentFormatter);
}
public void AddBindingParameters(OperationDescription operationDescription, BindingParameterCollection bindingParameters) {}
public void ApplyDispatchBehavior(OperationDescription operationDescription, DispatchOperation dispatchOperation) {}
public void Validate(OperationDescription operationDescription){}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment