In project Silk they use IServiceLocator to get an instance of "Handler" classes, what is the benefit of using this?
I mean in the controllers it looks like this:
Using<GetOverdueRemindersForUser>().Execute(CurrentUserId);
If they are to hard code the class name they could have gotten an instace of the class the normal way.
Is it just to save one line of code or is there another benefit?
I mean in the controllers it looks like this:
Using<GetOverdueRemindersForUser>().Execute(CurrentUserId);
If they are to hard code the class name they could have gotten an instace of the class the normal way.
Is it just to save one line of code or is there another benefit?