diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-22 13:35:22 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-04-22 13:35:22 +0300 |
| commit | de099bd3b50b8ea52b212b8d322626582c2648be (patch) | |
| tree | eea98a7f7b073d6cf8ded47bddc3b3f3f5e7c430 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs | |
| parent | 8edd1a95962a5c1c2e73d15f209a9fb362ff884a (diff) | |
| download | Tango-de099bd3b50b8ea52b212b8d322626582c2648be.tar.gz Tango-de099bd3b50b8ea52b212b8d322626582c2648be.zip | |
Implemented new TangoIOC container & TangoMessenger.
Got rid of MVVMLite libs !
Got rid of IShutdownRequestBlocker, IShutdownListener, IModuleRequestListener.
Implemented IStudioViewModel & StudioViewModel.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs index b3c16c2b4..94b2f4341 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModelLocator.cs @@ -1,6 +1,4 @@ -using GalaSoft.MvvmLight; -using GalaSoft.MvvmLight.Ioc; -using Microsoft.Practices.ServiceLocation; +using Tango.Core.DI; using Tango.MachineStudio.Logging.Navigation; using Tango.MachineStudio.Logging.ViewModels; @@ -17,21 +15,20 @@ namespace Tango.MachineStudio.Logging /// </summary> static ViewModelLocator() { - ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); - SimpleIoc.Default.Register<EventsViewVM>(); - SimpleIoc.Default.Register<ApplicationLogsViewVM>(); - SimpleIoc.Default.Register<EmbeddedLogsViewVM>(); - SimpleIoc.Default.Register<HomeViewVM>(); + TangoIOC.Default.Register<EventsViewVM>(); + TangoIOC.Default.Register<ApplicationLogsViewVM>(); + TangoIOC.Default.Register<EmbeddedLogsViewVM>(); + TangoIOC.Default.Register<HomeViewVM>(); - SimpleIoc.Default.Unregister<LoggingNavigationManager>(); - SimpleIoc.Default.Register<LoggingNavigationManager>(() => new LoggingNavigationManager()); + TangoIOC.Default.Unregister<LoggingNavigationManager>(); + TangoIOC.Default.Register<LoggingNavigationManager>(new LoggingNavigationManager()); } public static EventsViewVM EventsViewVM { get { - return ServiceLocator.Current.GetInstance<EventsViewVM>(); + return TangoIOC.Default.GetInstance<EventsViewVM>(); } } @@ -39,7 +36,7 @@ namespace Tango.MachineStudio.Logging { get { - return ServiceLocator.Current.GetInstance<ApplicationLogsViewVM>(); + return TangoIOC.Default.GetInstance<ApplicationLogsViewVM>(); } } @@ -47,7 +44,7 @@ namespace Tango.MachineStudio.Logging { get { - return ServiceLocator.Current.GetInstance<EmbeddedLogsViewVM>(); + return TangoIOC.Default.GetInstance<EmbeddedLogsViewVM>(); } } @@ -55,7 +52,7 @@ namespace Tango.MachineStudio.Logging { get { - return ServiceLocator.Current.GetInstance<HomeViewVM>(); + return TangoIOC.Default.GetInstance<HomeViewVM>(); } } } |
