public void CreateController(IView view) { Debug.Assert(view != null); Debug.Assert(_state == State.Initialized); _view = view; _scope = _controllerFactory.CreateScope(ref _serviceProvider); _controller = (TController)_controllerFactory.CreateViewController(_controllerType, this, _presentArgs, _view); _controllerEvents = _controller as IViewControllerEvents; _controllerEvents?.OnPresent(); _view.Disposed += OnDismissed; _state = State.Presented; }