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 am not sure if someone would implement their own presenter for handling the pages, commands, and static commands. I think we should register it either as DotvvmPresenter (if someone wants to modify it, they'll probably inherit this class anyway). Alternatively, we can let the user specify the default presenter using some other way.
Using IDotvvmPresenter (which is implemented by every presenter) as the service key is confusing, and it breaks everything in case someone accidentally registers the presenter as IDotvvmPresenter without a meaningful error message.
I got reports it happened when someone registered all presenters using Scrutor with AsSelfAndImplementedInterfaces. It is clearly an error, but it is quite difficult to find.
The text was updated successfully, but these errors were encountered:
This is just nitpicking and I am not sure if it is even a thing, but we are registering the default
DotvvmPresenter
asIDotvvmPresenter
:https://github.com/riganti/dotvvm/blob/main/src/Framework/Framework/DependencyInjection/DotVVMServiceCollectionExtensions.cs#L65
I am not sure if someone would implement their own presenter for handling the pages, commands, and static commands. I think we should register it either as
DotvvmPresenter
(if someone wants to modify it, they'll probably inherit this class anyway). Alternatively, we can let the user specify the default presenter using some other way.Using
IDotvvmPresenter
(which is implemented by every presenter) as the service key is confusing, and it breaks everything in case someone accidentally registers the presenter asIDotvvmPresenter
without a meaningful error message.I got reports it happened when someone registered all presenters using Scrutor with
AsSelfAndImplementedInterfaces
. It is clearly an error, but it is quite difficult to find.The text was updated successfully, but these errors were encountered: