Skip to content

Commit

Permalink
GetServiceByName to GetKeyedService
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescarter-le committed Jan 30, 2024
1 parent 8bf3e89 commit b8aface
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AWS/Orleans.Streaming.SQS/Streams/SQSAdapterFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static SQSAdapterFactory Create(IServiceProvider services, string name)
var cacheOptions = services.GetOptionsByName<SimpleQueueCacheOptions>(name);
var queueMapperOptions = services.GetOptionsByName<HashRingStreamQueueMapperOptions>(name);
IOptions<ClusterOptions> clusterOptions = services.GetProviderClusterOptions(name);
var dataAdapter = services.GetServiceByName<ISQSDataAdapter>(name)
var dataAdapter = services.GetKeyedService<ISQSDataAdapter>(name)
?? services.GetService<ISQSDataAdapter>()
?? ActivatorUtilities.CreateInstance<SQSDataAdapter>(services);
var factory = ActivatorUtilities.CreateInstance<SQSAdapterFactory>(services, name, sqsOptions, cacheOptions, queueMapperOptions, clusterOptions, dataAdapter);
Expand Down

0 comments on commit b8aface

Please sign in to comment.