public void Login(int id, string password) { var person = notifier.Login(id, password); if (person != null) { _eventAggregator.PublishOnUIThread(MessageType.LoginSuccess); _eventAggregator.PublishOnBackgroundThread(person); } }