Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (22 sloc) 601 Bytes
using System;
using Lokad.Cqrs;
using Recipes.Contracts;
namespace Recipes.Wires
{
public sealed class MessageSender : IFunctionalFlow
{
readonly SimpleMessageSender _sender;
public MessageSender(SimpleMessageSender sender)
{
_sender = sender;
}
public void Schedule(IRecipeCommand command, DateTime dateUtc)
{
_sender.SendOne(command, eb => eb.DeliverOnUtc(dateUtc));
}
public void SendCommandsAsBatch(IRecipeCommand[] commands)
{
_sender.SendBatch(commands);
}
}
}