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() #180

Closed tjrobinson closed 5 years ago

tjrobinson commented 5 years ago

When I have an error in my configuration, the call to AssertConfigurationIsValid() writes the error, then calls WhatDoIHave(). The problem I'm having is that the WhatDoIHave() output exceeds the size of the output console buffer (I'm using Rider), so it's difficult to see the errors.

There are obviously other ways to solve this problem but I wondered what you thought about another optional parameter being added to AssertConfigurationIsValid() to skip the WhatDoIHave() call? I'm happy to create a PR if you are on board with the idea.

Thanks.

https://github.com/JasperFx/lamar/blob/c0e0c2f8f50120ebf423f1ac93bb2987b6063867/src/Lamar/Container.cs#L60

jeremydmiller commented 5 years ago

@tjrobinson I'd happily take a PR, or I might just get to this myself today. See if this is closed by EOD Tuesday;)