本文整理汇总了C#中MessagePayload.GetFromAddress方法的典型用法代码示例。如果您正苦于以下问题:C# MessagePayload.GetFromAddress方法的具体用法?C# MessagePayload.GetFromAddress怎么用?C# MessagePayload.GetFromAddress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessagePayload
的用法示例。
在下文中一共展示了MessagePayload.GetFromAddress方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReceiveAcknowledgementFor
public void ReceiveAcknowledgementFor(MessagePayload messagePayload)
{
ReceiveMessage(
new MessagePayload()
.AsAcknowlegement(messagePayload.GetPersistenceId())
.SetToChannel(messagePayload.GetFromAddress().Channel));
}
示例2: LogMessage
protected static void LogMessage(MessagePayload toInput)
{
Logger.Debug(
"Repeating message: {0} on {1} with sequence {2}",
toInput.Id,
toInput.HasHeader<FromAddressHeader>() ? toInput.GetFromAddress().Channel : "n/a",
toInput.HasSequence() ? toInput.GetSequence().ToString() : "n/a");
}
示例3: HandleMessage
public void HandleMessage(MessagePayload toHandle, List<MessagePayload> outgoingMessages)
{
if (!toHandle.IsDirectChannelMessage()) return;
using (var context = new DirectReplyContext(toHandle.GetToAddress(), toHandle.GetFromAddress()))
{
messageReceiver.InputMessage(toHandle);
outgoingMessages.AddRange(context.GetCurrentReplies());
}
}
示例4: InputMessage
public override void InputMessage(MessagePayload toInput)
{
ReassignServerAddressIfRegistered(toInput.GetFromAddress().Server);
OnMessageProcessed(toInput);
}
示例5: RegisterFromServerAsAuthenticated
void RegisterFromServerAsAuthenticated(MessagePayload toInput)
{
registry.Register(toInput.GetFromAddress().Server);
}
示例6: GetAddress
protected override EndpointAddress GetAddress(MessagePayload toInput)
{
return toInput.GetFromAddress();
}
示例7: SetCurentSenderAddress
void SetCurentSenderAddress(MessagePayload toInput)
{
this.addressLookup.SetCurrentSenderAddress(toInput.GetFromAddress());
}