diff --git a/README.md b/README.md index d9a5dd7..c349bdc 100644 --- a/README.md +++ b/README.md @@ -72,15 +72,14 @@ builder.Services.MapQueue(config => con #### Scoped and Keyed Services ```cs -builder.Services.AddKeyedScoped("key-of-service"); -// or -builder.Services.AddKeyedScoped("key-of-service", (sp, key) => new BusinessService(... custom dependencies ...)); +builder.Services.AddKeyedScoped("key-of-service-1"); +builder.Services.AddKeyedScoped("key-of-service-2", (sp, key) => new BusinessService(... custom dependencies ...)); builder.Services.AddSingleton(); builder.Services.MapQueue(config => config .WithDispatchInChildScope() - .WithKeyedService("key-of-service") + .WithKeyedService("key-of-service-1") // or "key-of-service-2" .WithAdapter((svc, msg) => svc.DoSomethingAsync(msg)) .WithQueueName("events") .WithPrefetchCount(1)