Skip to content

Do not use the same ServiceCollection as the IHost#43

Open
nils-a wants to merge 1 commit intojuro-org:developfrom
nils-a-forks:feature/do-not-mess-with-ihost-di
Open

Do not use the same ServiceCollection as the IHost#43
nils-a wants to merge 1 commit intojuro-org:developfrom
nils-a-forks:feature/do-not-mess-with-ihost-di

Conversation

@nils-a
Copy link

@nils-a nils-a commented Sep 14, 2023

This most probably fixes the issue, described in spectreconsole/spectre.console#1267

The main change is that the IServiceCollection provided by the IHostBuilder is not modified by spectre.console, and not directly used by the ITypeResolver. Instead, we're using an unrelated IServiceCollection that will be modified by spectre.console. To have the registrations of the IServiceCollection from the IHostBuilder available "in" spectre.console, all registrations are "copied", as soon as the IHost was built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant