|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Channels;
namespace SlasheneFramework.WCF
{
public class ReplyToChannel : ProxyOutputChannel
{
readonly Uri _ReplyAddress;
public ReplyToChannel(Uri replyAddress, IOutputChannel inner)
: base(inner)
{
_ReplyAddress = replyAddress;
}
public override void Send(Message message)
{
ApplyReplyTo(message);
base.Send(message);
}
public override void Send(Message message, TimeSpan timeout)
{
ApplyReplyTo(message);
base.Send(message, timeout);
}
void ApplyReplyTo(Message message)
{
message.Headers.MessageId = new System.Xml.UniqueId();
message.Headers.From = new System.ServiceModel.EndpointAddress(_ReplyAddress);
message.Headers.ReplyTo = new System.ServiceModel.EndpointAddress(_ReplyAddress);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am currently the CTO of
Metaco, we are leveraging the Bitcoin Blockchain for delivering financial services.
I also developed a tool to make IaaS on Azure more easy to use
IaaS Management Studio.
If you want to contact me, go
this way