Created
October 27, 2011 23:09
-
-
Save plioi/1321166 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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