public void Initialize(SearchViewModel _viewModel, SearchPresenterModel _presenterModel, Action <string> goToDetails) { viewModel = _viewModel; presenterModel = _presenterModel; presenterModel.OnElementLoaded += LoadPoster; presenterModel.OnElementRemoved += RemovePoster; presenterModel.OnSearchRefreshed += SearchRefreshed; SetButtonActions(goToDetails); //presenterModel.OnElementLoaded += }
private void Start() { searchPM = new SearchPresenterModel(); searchPresenter = new SearchPresenterImpl(searchPM); searchInteractor = new MovieSearchImpl(searchPresenter, dataLoader, textureLoader); searchVM = new SearchViewModel(); searchController = new SearchController(searchInteractor, searchVM); detailsPM = new DetailsPresenterModel(); detailsPresenter = new DetailsPresenterImpl(detailsPM); detailsInteractor = new MovieDetailerImpl(detailsPresenter, textureLoader, dataLoader); detailsVM = new DetailsViewModel(); detailsController = new DetailsController(detailsInteractor, detailsVM); mainSearchView.Initialize(searchVM, searchPM, detailsController.SpecificSearch); detailsView.Initialize(detailsPM, detailsVM); relatedSearchView.SetButtonActions(detailsController.SpecificSearch); }
public SearchPresenterImpl(SearchPresenterModel _model) { model = _model; searchOutputData = new List <MovieSearchOutputData>(); }