Added a getting started project for WolverineFx.

This commit is contained in:
2026-06-26 16:12:51 +02:00
parent 3434e9fb91
commit 5b9d8c099b
12 changed files with 171 additions and 0 deletions
@@ -0,0 +1,25 @@
using System.Net.Mail;
namespace WolverineTutorial;
public static class IssueCreatedHandler
{
public static async Task Handle(IssueCreated created, IssueRepository repository)
{
var issue = repository.Get(created.Id);
var message = await BuildEmailMessage(issue);
using var client = new SmtpClient();
client.Send(message);
}
// This is a little helper method I made public
// Wolverine will not expose this as a message handler
private static Task<MailMessage> BuildEmailMessage(Issue issue)
{
// Build up a templated email message, with
// some sort of async method to look up additional
// data just so we can show off an async
// Wolverine Handler
return Task.FromResult(new MailMessage());
}
}