public void SetConfig(IRepositoryPost repository, IRepositoryQc repositoryQc, INotificationCenter notification, PostOtherThemeStrings otherThemeStrings, PostsViewController viewController, string id, int bodyWidth, int row, Action <int, nfloat> postHeightCounted, nfloat height) { var post = DataService.RepositoryController.RepositoryPost.GetOnePostById(id); _market = (EMarketTypes)Enum.Parse(typeof(EMarketTypes), post.ModelPost.Market); PostView.SetPostMarket(_market); Console.WriteLine(_market + " " + post.ModelPost.Content); PostInteractor = new InteractorPost(id, new OnePostController(DataService.RepositoryController.RepositoryPost), notification, repository, repositoryQc); var presenter = new PresenterPost( view: PostView, interactor: PostInteractor, router: new RouterPost(viewController), otherThemeStrings: otherThemeStrings, headerStylesHolder: new PostHeaderStylesHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser), socialStylesHolder: new PostSocialStylesHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser), bodyStylesHolder: new PostBodyStylesHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser), postLocale: DataService.RepositoryController.RepositoryPost.LangPost, isPostDetailed: false ); SetCellWidth(bodyWidth); TransfareActionToView(postHeightCounted, row); PostInteractor.SendRequestForPosts(); var fr = PostView.Frame; fr.Height = height; PostView.Frame = fr; }
public InteractorPostBody(string postId, INotificationCenterPostBody notificationCenter, IRepositoryPost repository) { PostId = postId; _repository = repository; _notificationCenter = notificationCenter; // _notificationCenter.PostBodyDataIncome = OnNotificationIncome; }
public PostsController(IContactCreator contactCreator, Func <string, List <DataModelPost> > parseResponsePost, IRepositoryPost repositoryPost) { ContactCreator = contactCreator; _parseResponsePost = parseResponsePost; _repositoryPost = repositoryPost; _repositoryPost.OnAllPostsIncome += AllPostsIncome; }
public InteractorPostSocial(string postId, IPostSocialController postSocialController, INotificationCenterPostSocial notificationCenter, IRepositoryPost repository) { _postId = postId; _repository = repository; _postSocialController = postSocialController; _postSocialController.OnRecieveModel += ControllerOnMessage; }
public InteractorPostHeader(string postId, IPostHeaderController postHeaderController, IRepositoryPost repository) { PostId = postId; _repository = repository; _postHeaderController = postHeaderController; _postHeaderController.OnRecieveModel += ControllerOnMessage; _postHeaderController.OnQcModelUpdate += OnMessageQc; }
public PostsViewHolder(View itemView, INotificationCenter notification, IRepositoryPost repository, IRepositoryQc repositoryQc, PostOtherThemeStrings otherThemeStrings) : base(itemView) { _repository = repository; _repositoryQc = repositoryQc; _notification = notification; _otherThemeStrings = otherThemeStrings; _itemView = itemView; }
public InteractorPost(string postId, IOnePostController onePostsController, INotificationCenter notificationCenter, IRepositoryPost repository, IRepositoryQc repositoryQc) { _postId = postId; _repository = repository; _onePostController = onePostsController; _onePostController.OnRecieveModel += ControllerOnMessage; InteractorPostBody = new InteractorPostBody(_postId, notificationCenter, repository); InteractorPostChart = new InteractorPostChart(notificationCenter, repository); InteractorPostHeader = new InteractorPostHeader(_postId, new PostHeaderController(ConnectionController.GetInstance(), WebMsgParser.ParseResponseDeletePost, notificationCenter, repositoryQc, repository.GetPostById(_postId).Quote), repository); InteractorPostSocial = new InteractorPostSocial(_postId, new PostSocialController(ConnectionController.GetInstance(), WebMsgParser.ParseResponsePostLike), notificationCenter, repository); //InteractorPostStatistics = new InteractorPostStatistics(notificationCenter, repository); InteractorTrade = new InteractorTrade(notificationCenter, repository); }
public OnePostController(IRepositoryPost repositoryPost) { _repositoryPost = repositoryPost; }
public UpdatePostController(IContactCreator connectionController, Func <string, DataModelPost> parseResponseFunc, INotificationCenterQc notificationCenterQc, IRepositoryQcPrice repositoryQc, IRepositoryPost repositoryPost) : base(connectionController, parseResponseFunc, notificationCenterQc, repositoryQc) { _repositoryPost = repositoryPost; }
public BusinessPost(IRepositoryPost postRepository, IRepositoryUser userRepository) : base(postRepository) { _postRepository = postRepository; _userRepository = userRepository; }
public InteractorUpdatePost(string postId, IUpdatePostController updatePostController, IRepositoryUpdatePost repositoryUpdatePost, IRepositoryPost repositoryPost, IRepositoryUserAuth repositoryUser) { if (string.IsNullOrWhiteSpace(postId)) { throw new ArgumentNullException(nameof(postId)); } _updatePostController = updatePostController ?? throw new ArgumentNullException(nameof(updatePostController)); _repository = repositoryUpdatePost ?? throw new ArgumentNullException(nameof(repositoryUpdatePost)); _repositoryUser = repositoryUser ?? throw new ArgumentNullException(nameof(repositoryUser)); if (repositoryPost == null) { throw new ArgumentNullException(nameof(repositoryPost)); } var postModel = repositoryPost.GetPostById(postId); if (_repository.UpdatePostModel == null) { _repository.UpdatePostModel = new UpdatePostModel(postModel.Market == "Simple", postId, postModel.Quote, postModel.Forecast, postModel.Price, postModel.Recommend, postModel.Access, postModel.Image, postModel.Content); } _updatePostController.OnRecieveModel += ControllerOnMessage; }
public BusinessCategory(IRepositoryCategory categoryRepository, IRepositoryPost postRepository) : base(categoryRepository) { _categoryRepository = categoryRepository; _postRepository = postRepository; }
public InteractorPostStatistics(INotificationCenter notificationCenter, IRepositoryPost repository) { _repository = repository; _notificationCenter = notificationCenter; }
public InteractorPostChart(INotificationCenter notificationCenter, IRepositoryPost repository) { _repository = repository; _notificationCenter = notificationCenter; }
public ServicePost(IRepositoryPost repositoryPost, IRepositoryAnswerPost repositoryAnswer) : base(repositoryPost) { _repositoryPost = repositoryPost; _repositoryAnswerPost = repositoryAnswer; }