Created
April 10, 2012 11:20
-
-
Save dtryon/2350610 to your computer and use it in GitHub Desktop.
NSB publish
This file contains hidden or 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 interface IDidSomething | |
| { | |
| int UserID { get; set; } | |
| DateTime EventDate { get; set; } | |
| } | |
| public class Publisher | |
| { | |
| public IBus Bus { get; set; } | |
| public void DoSomething(int userId) | |
| { | |
| Bus.Publish<IDidSomething>(m => { | |
| m.UserID = userId; | |
| m.EventDate = DateTime.UtcNow; | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment