问题
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