Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
luizcarlosfaria authored Jun 3, 2024
1 parent 2d991c0 commit 4ce10b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ builder.Services.MapQueue<BusinessService, BusinessCommandOrEvent>(config => con

```

#### Scoped and Keyed Services, Same Type, Multiple Consumers
#### Scoped and Keyed Services, Same Type, Multiple Consumers, Using NewtonsoftAMQPSerializer
```cs
builder.Services.AddKeyedScoped<BusinessService>("key-of-service-1");
builder.Services.AddKeyedScoped("key-of-service-2", (sp, key) => new BusinessService(... custom dependencies ...));

builder.Services.AddSingleton<IAMQPSerializer, SystemTextJsonAMQPSerializer>();
builder.Services.AddSingleton<IAMQPSerializer, NewtonsoftAMQPSerializer>();

builder.Services.MapQueue<BusinessService, BusinessCommandOrEvent>(config => config
.WithDispatchInChildScope()
Expand Down

0 comments on commit 4ce10b2

Please sign in to comment.