Replace Container reference in shellViewModel

Replaced container reference with IoC instead
This commit is contained in:
s459315 2022-07-24 00:08:22 +02:00
parent db546557fa
commit 2b2897e128

View File

@ -13,17 +13,15 @@ namespace RMWPFUserInterface.ViewModels
{ {
private IEventAggregator _events; private IEventAggregator _events;
private SalesViewModel _salesVM; private SalesViewModel _salesVM;
private SimpleContainer _container;
public ShellViewModel(IEventAggregator events, SalesViewModel salesVM, public ShellViewModel(IEventAggregator events, SalesViewModel salesVM,
SimpleContainer container) SimpleContainer container)
{ {
_salesVM = salesVM; _salesVM = salesVM;
_container = container;
_events = events; _events = events;
_events.SubscribeOnUIThread(this); _events.SubscribeOnUIThread(this);
ActivateItemAsync(_container.GetInstance<LoginViewModel>()); ActivateItemAsync(IoC.Get<LoginViewModel>());
} }
public Task HandleAsync(LogOnEvent message, CancellationToken cancellationToken) public Task HandleAsync(LogOnEvent message, CancellationToken cancellationToken)