Dispatching An Async Request
Usage
public class Program
{
private static async Task Main(string[] args)
{
var host = Host.CreateDefaultBuilder()
.ConfigureServices((hostContext, services) =>
{
services.AddBrighter()
.AutoFromAssemblies();
}
)
.UseConsoleLifetime()
.Build();
var commandProcessor = host.Services.GetService<IAmACommandProcessor>();
await commandProcessor.SendAsync(new GreetingCommand("Ian"));
await host.RunAsync();
}Registering a Handler
Pipelines Must be Homogeneous
Dispatching Requests
Returning results to the caller.
Cancellation
Async Callback Context
Last updated
Was this helpful?
