public UserController(IUserService userService, ICachingService cachingService, ICommunicationProviderService serviceProviderService, ISocialIntegrationService socialIntegrationService, IAccountService accountService, IUrlService urlService) { this.userService = userService; this.cachingService = cachingService; this.serviceProviderService = serviceProviderService; this.socialIntegrationService = socialIntegrationService; this.accountService = accountService; this.urlService = urlService; }
public CampaignJob( ICampaignService campaignService, ICommunicationService communicationService, ICustomFieldRepository customFieldRepository, ISocialIntegrationService socialIntegrationService, IAccountService accountService, EmailValidator emailValidator, MailService mailService, JobServiceConfiguration jobConfig) { _campaignService = campaignService; _communicationService = communicationService; _accountService = accountService; _emailValidator = emailValidator; _customFieldRepository = customFieldRepository; _socialIntegrationService = socialIntegrationService; _mailService = mailService; _jobConfig = jobConfig; }
private void ShareSocialPost(ISocialIntegrationService socialIntegrationService, Campaign campaign) { var posts = _campaignService.GetCampaignPosts(new GetCampaignSocialMediaPostRequest() { CampaignId = campaign.Id, UserId = 0, CommunicationType = string.Empty }).Posts ?? new List <UserSocialMediaPosts>(); posts.ToList().ForEach(post => { Log.Informational(string.Format("In sending social posts {0}, communication type : {1}", campaign.ToString(), post.CommunicationType)); if (post.CommunicationType == "Facebook") { socialIntegrationService.PostToFacebook(post.UserID, post.Post, post.AttachmentPath); } else { socialIntegrationService.Tweet(post.UserID, post.Post); } }); }