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
Would be helpful if we could get a runtime error if a dependency is not found in the DI container upon injection.
Example:
I have a page with a constructor that takes in a ViewModel (Injected) and a Service (Lets call it Service A)
I navigate to the page using Shell's GoToAsync but the page never renders...no error.
The reason was that I never registered Service A using the builder...stupid mistake from my side, but it took me a while to realize I forgot this important step.
It would be nice if some error was thrown when the transient page gets instantiated and Service A is not available in the container.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Would be helpful if we could get a runtime error if a dependency is not found in the DI container upon injection.
Example:
I have a page with a constructor that takes in a ViewModel (Injected) and a Service (Lets call it Service A)
I navigate to the page using Shell's GoToAsync but the page never renders...no error.
The reason was that I never registered Service A using the builder...stupid mistake from my side, but it took me a while to realize I forgot this important step.
It would be nice if some error was thrown when the transient page gets instantiated and Service A is not available in the container.
Beta Was this translation helpful? Give feedback.
All reactions