public class Form1 : Form
{
private readonly IBus _bus;
public Form1(IBus bus)
{
_bus = bus;
_bus.AutoWire(this);
}
private void Handle(SomeMessage message)
{
// methods called Handle with one argument will be auto wired up by bus.AutoWire
// unwiring will automagically happen on dispose
}
private void CreateButton_OnClick(Object sender, EventArgs e)
{
_bus.Publish(new CandidateCreatedEvent{
Name = txtName.Text,
Sex = cmbSex as Gender,
});
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
Pondidum/Membus
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Simple in memory bus for single applications
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published