Ejemplo n.º 1
0
 public PostService(
     ICreatePost createPost,
     IUserRepository userRepository,
     IPostRepository postRepository,
     IListPosts listPosts,
     IRemovePost removePost,
     IUnityOfWork unityOfWork)
 {
     this.createPost     = createPost;
     this.userRepository = userRepository;
     this.postRepository = postRepository;
     this.listPosts      = listPosts;
     this.removePost     = removePost;
     this.unityOfWork    = unityOfWork;
 }
Ejemplo n.º 2
0
        public PresenterUpdatePost(IViewUpdatePost view, IInteractorUpdatePost interactor, IRouterUpdatePost router, IUpdatePostStylesHolder stylesHolder, ICreatePost createPostLocaleStrings)
        {
            if (view == null || interactor == null || router == null)
            {
                throw new NullReferenceException();
            }

            _router               = router;
            _view                 = view;
            _interactor           = interactor;
            _view.Presenter       = this;
            _interactor.Presenter = this;
            _stylesHolder         = stylesHolder;
            _locale               = createPostLocaleStrings;
        }
Ejemplo n.º 3
0
        public void SetLocale(ICreatePost lang)
        {
            _locale = lang;

            if (_locale != null)
            {
                _view.SetCommentHint(_locale.EnterCommentLabel);
                _view.SetForecastTime(_locale.TimeTextView);
                _view.SetAccessMode(_locale.Public);
                _view.SetBuySell(_locale.BuySellTextView);
                _view.SetTools(_locale.ToolsButton.ToUpper());
                _view.SetPrice(_locale.PriceLabel);
                _view.SetToolBarPublishButtonLocale(_locale.PublishButton);
                _view.SetToolBarTitleTextViewLocale(_locale.UpdatePostActivityTitle);
            }
        }
Ejemplo n.º 4
0
  /// <summary>
  /// Constructor to initialise dependencies
  /// </summary>
 public CreatePostController(ICreatePost the_new_post_command)
 {
     new_post_command = Guard.IsNotNull(the_new_post_command, "the_new_post_command");
 }