Understanding IServiceProvider and QueryService

匆匆过客 提交于 2020-01-25 09:25:27

问题


Can anyone explain the idea behind IServiceProvider and QueryService? I don't understand what a service is and how it differs from another type of object or interface. I've seen little explanation--mainly some remarks here and here on MSDN, but I don't understand them. Why would you have IServiceProvider and QueryService instead of just having some sort of "GetAnotherObject" method? Thanks for any guidance.

来源:https://stackoverflow.com/questions/59432866/understanding-iserviceprovider-and-queryservice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!