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; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); RequestWindowFeature(WindowFeatures.NoTitle); SetContentView(Resource.Layout.UpdatePostActivity); _postId = Intent.GetStringExtra("id"); IViewUpdatePost updatePostView = FindViewById <UpdatePostView>(Resource.Id.updatePost_view); IInteractorUpdatePost interactor = new InteractorUpdatePost(_postId, new UpdatePostController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseCreatePost, DataService.NotificationCenter, DataService.RepositoryController.RepoQc, DataService.RepositoryController.RepositoryPost), DataService.RepositoryController.RepositoryUpdatePost, DataService.RepositoryController.RepositoryPost, DataService.RepositoryController.RepositoryUserAuth); _presenter = new PresenterUpdatePost(updatePostView, interactor, new RouterUpdatePost(this), new UpdatePostStylesHolderDroid <GlobalControlsTheme>(new ThemeParser <GlobalControlsTheme>()), Localization.Lang); }