Validating Dependency Injection configuration in .Net Core