Last active
October 15, 2020 13:46
-
-
Save suchithm/88209b3787bd838eb2ac3f4505e1263f to your computer and use it in GitHub Desktop.
ViewModelLocator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CommonServiceLocator; | |
namespace SampleAutoFacDI.ViewModels | |
{ | |
public class ViewModelLocator | |
{ | |
static ViewModelLocator() | |
{ | |
AutoFacContainer.Initialize(); | |
} | |
public MainPageViewModel MainPageViewModel | |
{ | |
get | |
{ | |
return ServiceLocator.Current.GetInstance<MainPageViewModel>(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment