When calling Container.Verify() only the first error is always returns. While this is fine for most scenario's, e.g. when the user forgot to register an interface, it is very useful to see all errors especially when the code is being refactored.
There are possible ways to do this:
- Add an
Container.Verify(bool showAllErrors) overload
- Add a property to the exception thrown by
Container.Verify() that contains the full list of errors, and append text to the exception message stating something like "You are only shown the first error. To see the full list of validation errors, please inspect the ValidationErrors property."
When calling
Container.Verify()only the first error is always returns. While this is fine for most scenario's, e.g. when the user forgot to register an interface, it is very useful to see all errors especially when the code is being refactored.There are possible ways to do this:
Container.Verify(bool showAllErrors)overloadContainer.Verify()that contains the full list of errors, and append text to the exception message stating something like "You are only shown the first error. To see the full list of validation errors, please inspect the ValidationErrors property."