Quantcast
Channel: patterns & practices: Project Silk
Viewing all articles
Browse latest Browse all 93

New Post: IServiceLocator in project Silk

$
0
0
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?

Viewing all articles
Browse latest Browse all 93

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>