You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a requirement to add virtually all the types in an app to the container, so there is not much filtering of the classes in my scan. Some classes that are getting included cannot actually be instantiated by the container. So far its been attributes, and records.
I've been having difficulty coming up with a way to check that the type can be instantiated before adding it... is there a scrutor-approved way of doing this in a scenario like this?
The text was updated successfully, but these errors were encountered:
is there a scrutor-approved way of doing this in a scenario like this?
Hey @monkeydeus! 👋🏻 Not really. Trying to instantiate types at scan-time would be really expensive. You could maybe discover some issues by using ValidateOnBuild, but this should be on by default during development.
That is what I figured, but thanks for getting back quickly. I think I can narrow the scope of how I am using Scrutor instead, for now, and revisit this idea in a future rev.
I've got a requirement to add virtually all the types in an app to the container, so there is not much filtering of the classes in my scan. Some classes that are getting included cannot actually be instantiated by the container. So far its been attributes, and records.
I've been having difficulty coming up with a way to check that the type can be instantiated before adding it... is there a scrutor-approved way of doing this in a scenario like this?
The text was updated successfully, but these errors were encountered: