Example #1
0
        public PresenterPostBody(IViewPostBody view, IInteractorPostBody interactor, IRouterPostBody router, IPostBodyStylesHolder stylesHolder, bool isDetailedPost)
        {
            if (view == null || interactor == null || router == null)
            {
                throw new NullReferenceException();
            }

            _router = router;

            _interactor                = interactor;
            _interactor.Presenter      = this;
            _interactor.IsPostDetailed = isDetailedPost;

            _stylesHolder = stylesHolder;

            _view           = view;
            _view.Presenter = this;

            _view.SetConfig();
        }
Example #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();
        }