-
Notifications
You must be signed in to change notification settings - Fork 26
Message Types
TheDumbTechGuy edited this page Jun 27, 2017
·
3 revisions
class TestCommand : ICommand { }
class TestCommandHandler : ICommandHandler<TestCommand>
{
public async Task Handle(TestCommand command)
{
Console.WriteLine("Test command handler");
}
}
class TestEvent : IEvent { }
class TestEventHandler : ICommandHandler<TestEvent>
{
public async Task Handle(TestEvent testEvent)
{
Console.WriteLine("Test even thandler");
}
}
class TestResult { }
class TestQuery : IQuery<TestQuery, TestResult> { }
class TestQueryHandler : IQueryHandler<TestQuery, TestResult>
{
public async Task<TestResult> Handle(TestQuery testQuery)
{
return new TestResult();
}
}
class Message { }
class TestMessageHandler : IMessageHandler<Message>
{
public async Task<Unit> Handle(Message message)
{
return Unit.Unit;
}
}