Created
November 10, 2011 22:02
-
-
Save bmavity/1356386 to your computer and use it in GitHub Desktop.
Publishing
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 void Dispatch(Commit commit) | |
{ | |
var bus = _container.Resolve<IServiceBus>(); | |
var events = commit.Events.Select(x => x.Body); | |
var publishMe = events.ElementAt(0); | |
Console.WriteLine("Publishing: " + publishMe.GetType().Name); | |
bus.Publish(publishMe); // doesn't work | |
bus.Publish(publishMe as MyMessage); // works | |
} |
Right. I saw an extension method implementation on the google group. Has it made it into a release yet or should I just copy it?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ah yeah, because its actually Publish(T message)