Closed arishlabroo closed 6 years ago
@arishlabroo I would have closed this anyway;) Lamar isn't going to be supporting that behavior.
@jeremydmiller . Lamar supports Decorators though. Also, the problem is only when using the webhostbuilder. In a console app, or standalone unit test, the decorator behavior is correct. As I mentioned in the issue https://github.com/JasperFx/lamar/issues/83 , not sure if the behavior is limited to decorators honestly.
"Lamar supports Decorators though" -- uh, huh. Calling ConfigureContainer() just to add policies and decorators requires Lamar to effectively rebuild the container from scratch. I'm not enthusiastic about that. SM got away with that kind of "you can change me anytime" by making all decisions at runtime. And that's what made SM much, much slower compared to Lamar
Adding a decorator is
ConfigureContainer
takes effect for structuremap but not for lamar. This pull request should not be merged as it adds structuremap dependency, but I wanted to leave it in there to show different behavior.