private void NavigateTo(NavigationMessage message) { var activeItem = _conductor.ActiveItem; if (CanCloseItem(activeItem)) { CloseItem(activeItem); } if (message.Item != null) { ActivateItem(message.Item as T); } else { var item = IoC.GetInstance(message.ItemType, null) as T; ActivateItem(item); } }
/// <summary> /// Navigates the specified message. /// </summary> /// <param name="message">The message.</param> public void Navigate(NavigationMessage message) { Ensure.That(message).IsNotNull(); NavigateTo(message); }