public ShellViewModel(IRegionNavigationAdapter navigationAdapter, IAsyncEventAggregator eventAggregator) { navigationAdapter.NullGuard(); eventAggregator.NullGuard(); eventAggregator.GetEvent <ModuleChangingEvent>().SubcribeAsync( type => { return(navigationAdapter.RequestWorkspaceNavigationAsync(type.Value.FullName)); }); }
private async Task NavigateCalled(object parameter) { await _eventAggregator.GetEvent <ModuleChangingEvent>().PublishAsync(new DataEventArgs <Type>((Type)parameter)); }