Skip to content

Instantly share code, notes, and snippets.

@bmavity
Created November 10, 2011 22:02
Show Gist options
  • Save bmavity/1356386 to your computer and use it in GitHub Desktop.
Save bmavity/1356386 to your computer and use it in GitHub Desktop.
Publishing
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
}
@bmavity
Copy link
Author

bmavity commented Nov 10, 2011

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