예제 #1
0
        public PresenterPostHeader(IViewPostHeader view, IInteractorPostHeader interactor, IRouterPostHeader router, IPost postLocaleStrings, IPostHeaderStylesHolder styleHolder)
        {
            if (view == null || interactor == null || router == null)
            {
                throw new ArgumentNullException();
            }

            _styleHolder          = styleHolder;
            _view                 = view;
            _interactor           = interactor;
            _router               = router;
            _view.Presenter       = this;
            _interactor.Presenter = this;
            _postLocaleStrings    = postLocaleStrings;

            _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();
        }