-
Notifications
You must be signed in to change notification settings - Fork 289
Open
Copy link
Labels
Area: MTPBelongs to the Microsoft.Testing.Platform core libraryBelongs to the Microsoft.Testing.Platform core library
Description
We have multiple places where we pass IServiceProvider to constructors. Usually, it's better to make the dependencies very explicit (helps with testability and code clarity as to what exactly a specific component needs).
There might be cases where the service isn't available yet during the constructor, and in these cases we should clearly document that the service is intentionally retrieved later via IServiceProvider because it's not available yet in the constructor.
Today, at least the following classes have IServiceProvider in constrcutor. I didn't validate yet which is valid usage, if any, and which needs to be updated).
- RetryExecutionFilterFactory
- HotReloadTestHostTestFrameworkInvoker
- RetryFailedTestsPipeServer
- RetryLifecycleCallbacks
- RetryDataConsumer
- MSBuildConsumer
- RetryOrchestrator
EvangelinkCopilot
Metadata
Metadata
Assignees
Labels
Area: MTPBelongs to the Microsoft.Testing.Platform core libraryBelongs to the Microsoft.Testing.Platform core library