Skip to content

Instantly share code, notes, and snippets.

@fatihdumanli
Last active November 3, 2020 20:13
Show Gist options
  • Save fatihdumanli/c39bf27be4b04deb326373b8a4a23874 to your computer and use it in GitHub Desktop.
Save fatihdumanli/c39bf27be4b04deb326373b8a4a23874 to your computer and use it in GitHub Desktop.
Example usage of IMessageHandler
using EventTower;
using MessagesCommon;
using System;
using System.Threading.Tasks;
namespace Worker
{
public class EventHandler
: IMessageHandler<MessagesCommon.CustomerEmailChanged>
{
public Task Handle(CustomerEmailChanged message)
{
Console.WriteLine("An event received. CustomerId: {0}", message.CustomerId);
return Task.CompletedTask;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment