JasperFx / lamar

Fast Inversion of Control Tool and Successor to StructureMap
https://jasperfx.github.io/lamar
MIT License
568 stars 119 forks source link

Option to skip WhatDoIHave() when calling AssertConfigurationIsValid() #184

Closed tjrobinson closed 5 years ago

tjrobinson commented 5 years ago

Proposed solution to https://github.com/JasperFx/lamar/issues/180

I think the above is the simplest solution to the problem. However, perhaps a nicer alternative would be to remove the WhatDoIHave() output from the ContainerValidationException exception message entirely and instead store it in a new property on ContainerValidationException? That way the console and logging framework writes would be reduced in size and contain just the error information, but the full WhatDoIHave() detail would be available in the exception where required.

jeremydmiller commented 5 years ago

@tjrobinson I got this basically the way you suggested. Added type scanning diagnostics as well. Thanks, and this will be in Lamar 3.1 soon.