Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

SimpleIoc is no longer inherited from IServiceLocator in Std10 version. #91

Open
manupstairs opened this issue Sep 13, 2020 · 2 comments

Comments

@manupstairs
Copy link

manupstairs commented Sep 13, 2020

Hi, I have a question about SimpleIoc.
Why is SimpleIoc no longer inherited from IServiceLocator in Std10 version?
This will cause compatibility issues with ServiceLocator.

I checked the code, seems we don't need CommonServiceLocator any more.
We can use the SimpleIoc directly.

I'm just curious why we needed CommonServiceLocator before. Could you please help to explain?

I would appreciate it if you could help answer this question.
Thanks.

@manupstairs manupstairs changed the title SimpleIoc is no longer inherited from IServiceLocator. SimpleIoc is no longer inherited from IServiceLocator in Std10 version. Sep 13, 2020
@jamesmcroft
Copy link

@manupstairs at the time that MvvmLight was ported to .NET standard, the CommonServiceLocator didn't support .NET Standard so was removed.

@tjmullen2
Copy link

By removing compatibility with CommonServiceLocator, unit testing through Moq to return our mocks in case of GetInstance is now not possible. We used to be able to mock the GetInstance<> returns via CommonServiceLocator. Is there any word on when this functionality will be changed back? Or do you have suggestions on how to do this with the current implementation?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants