public HomeController(IUserRepository userRepository, IContext context, ITwitterFactory twitterFactory, IMailController mailController) { this.userRepository = userRepository; this.context = context; this.twitterFactory = twitterFactory; this.mailController = mailController; }
public AuthenticatedHomePageViewModel(User user, ITwitterFactory twitter) { Email = user.Email; var twitterUser = twitter.CurrentUser; if (twitterUser == null) throw new InvalidOperationException("twitterUser was not found or was just null"); ProfilePicUrl = twitterUser.ProfileImageUrl; TwitterHandle = twitterUser.ScreenName; var service = twitter.Create(); if (twitterUser == null) throw new InvalidOperationException("Twitter service was null or just couldn't be constructed"); Favorites = service.ListFavoriteTweets(2, 5); }
public AuthenticatedHomePageViewModel(User user, ITwitterFactory twitter) { Email = user.Email; var twitterUser = twitter.CurrentUser; if (twitterUser == null) { throw new InvalidOperationException("twitterUser was not found or was just null"); } ProfilePicUrl = twitterUser.ProfileImageUrl; TwitterHandle = twitterUser.ScreenName; var service = twitter.Create(); if (twitterUser == null) { throw new InvalidOperationException("Twitter service was null or just couldn't be constructed"); } Favorites = service.ListFavoriteTweets(2, 5); }
public TweetRepository(ITwitterFactory twitterFactory) { this.twitterFactory = twitterFactory; }
public TwitterCollector() { twitterFactory = new TweetFactory(); xmlManager = new XMLManager(); }