iservicelocator

What is the IServiceLocator interface?

孤者浪人 提交于 2019-12-10 13:05:54
问题 From what I understand IServiceLocator is an interface to abstract the actual IoC container away? I'm asking with relation to Prism where I'm trying to replace Unity with Prism, and I see Prism-classes relying on IServiceLocator. Could someone please clarify the role of the interface and when it is used? And also; what is the Common Service Locator, and will this be helpful when working with IServiceLocator? 回答1: IServiceLocator is an abstraction of a service locator. IoC containers are kind