Skip to content

Instantly share code, notes, and snippets.

@plioi
Created October 27, 2011 23:09
Show Gist options
  • Save plioi/1321166 to your computer and use it in GitHub Desktop.
Save plioi/1321166 to your computer and use it in GitHub Desktop.
public class MessageBus
{
public void Send(IMessage message)
{
//Sends a single message.
}
public void SendAll(List<IMessage> messages)
{
foreach (var message in messages)
Send(message);
}
}
...
List<RemoveOrderLineItem> removals = new List<RemoveOrderLineItem>();
removals.Add(new RemoveOrderLineItem());
removals.Add(new RemoveOrderLineItem());
removals.Add(new RemoveOrderLineItem());
var bus = new MessageBus();
bus.SendAll(removals);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment