예제 #1
0
        public PresenterPostSocial(IViewPostSocial view, IInteractorPostSocial interactor, IRouterPostSocial router, IPost postLocaleStrings, IPostSocialStylesHolder stylesHolder)
        {
            if (view == null || interactor == null || router == null)
            {
                throw new NullReferenceException();
            }

            _stylesHolder         = stylesHolder;
            _view                 = view;
            _interactor           = interactor;
            _view.Presenter       = this;
            _interactor.Presenter = this;
            _router               = router;

            _postLocaleStrings = postLocaleStrings;

            SetLocale();
            _view.SetConfig();
        }
예제 #2
0
        public PresenterPost(IViewPost view, IInteractorPost interactor, IRouterPost router, PostOtherThemeStrings otherThemeStrings, IPostHeaderStylesHolder headerStylesHolder,
                             IPostSocialStylesHolder socialStylesHolder, IPostBodyStylesHolder bodyStylesHolder, IPost postLocale, bool isPostDetailed)
        {
            _view              = view;
            _router            = router;
            _interactor        = interactor;
            _postLocale        = postLocale;
            _isPostDetailed    = isPostDetailed;
            _otherThemeStrings = otherThemeStrings;

            IPresenterPostHeader presenterPostHeader = new PresenterPostHeader(view.ViewPostHeader, interactor.InteractorPostHeader, router, DataService.RepositoryController.RepositoryPost.LangPost, headerStylesHolder);
            IPresenterPostBody   presenterPostBody   = new PresenterPostBody(view.ViewPostBody, interactor.InteractorPostBody, router, bodyStylesHolder, isPostDetailed);
            IPresenterPostSocial presenterPostSocial = new PresenterPostSocial(view.ViewPostSocial, interactor.InteractorPostSocial, router, DataService.RepositoryController.RepositoryPost.LangPost, socialStylesHolder);

            interactor.InteractorPostBody.Presenter   = presenterPostBody;
            interactor.InteractorPostHeader.Presenter = presenterPostHeader;
            interactor.InteractorPostSocial.Presenter = presenterPostSocial;

            _view.SetConfig();

            presenterPostHeader.SetConfig();
            presenterPostSocial.SetConfig();
        }