quick question for my MVP implementation:
I currently have the code below, in which both the presenter and presentation are resolved through the container.
The host then calls View.Init to jump to the view.
I was wondering if there is a way to allow the container to set my circular link (view -> presenter, presenter -> view).
class Presenter : IPresenter { private View _view; public Presenter(IView view, ...){ _view = view; _view.Init(this) } } class View : IView { private IPresenter _presenter; public void Init(IPresenter presenter){ _presenter = presenter; } }
respectfully
Frederick
source share