Skip to content

Commit

Permalink
Resolve the last dependency to allow injection overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneyaoo committed Mar 9, 2023
1 parent e6db630 commit 65fbfb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cocona.Lite/Lite/CoconaLiteServiceProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public object GetService(Type serviceType)

if (_descriptorsByService.TryGetValue(serviceType, out var descriptors) && descriptors.Length != 0)
{
return descriptors[0].Factory(this, _disposables);
return descriptors[descriptors.Length - 1].Factory(this, _disposables);
}

return null!;
Expand Down

0 comments on commit 65fbfb5

Please sign in to comment.