CarterCommunity / Carter

Carter is framework that is a thin layer of extension methods and functionality over ASP.NET Core allowing code to be more explicit and most importantly more enjoyable.
MIT License
2.1k stars 175 forks source link

[WIP] Removed assembly scanning by adding a bootstrapper #122

Closed RagingKore closed 4 years ago

RagingKore commented 6 years ago

Removed assembly scanning and 99% of DI dependency by adding a simple bootstrapper, that still needs to be registered since Validation and Response extensions will require access to validators and negotiators.

CarterOptions still contain the global hooks setup, but was considering moving those to the bootstraper too.

This also opens the door to delegate composition as we now depend on a CarterRoute, not the module.

Performance optimizations are included.

This targets #115 and somewhat supersedes #116 and #121.

RagingKore commented 6 years ago

Maybe it would be nice to keep backward compatibility by allowing a way to still run assembly scanning.

RagingKore commented 6 years ago

This targets #115 and somewhat supersedes #116 and #121.

jchannon commented 6 years ago

@thefringeninja fancy giving this some 👀

jchannon commented 6 years ago

What we really need to do is setup a windows box and run some profiling on this PR comparing it to master

jchannon commented 6 years ago

I wonder if we should tackle the old "scoped" issue with a bootstrapper somehow so we could get rid of the if (bootstrapper != null) and maybe if the collections are empty on the bootstrapper we do the assembly scanning anyway??

RagingKore commented 6 years ago

That was the idea, I just waited a bit to get feedback since it will still require a bit of work and I wanted to make sure that we can continue down this road.

jchannon commented 4 years ago

We have CarterConfigurator which I think will fix the ass scanning