public HomeController(IUserRepository userRepository, IContext context, ITwitterFactory twitterFactory,
     IMailController mailController)
 {
     this.userRepository = userRepository;
     this.context = context;
     this.twitterFactory = twitterFactory;
     this.mailController = mailController;
 }
Exemple #2
0
 public HomeController(IUserRepository userRepository, IContext context, ITwitterFactory twitterFactory,
                       IMailController mailController)
 {
     this.userRepository = userRepository;
     this.context        = context;
     this.twitterFactory = twitterFactory;
     this.mailController = mailController;
 }
Exemple #3
0
 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);
 }
Exemple #4
0
        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;
 }
Exemple #6
0
 public TweetRepository(ITwitterFactory twitterFactory)
 {
     this.twitterFactory = twitterFactory;
 }
Exemple #7
0
 public TwitterCollector()
 {
     twitterFactory = new TweetFactory();
     xmlManager     = new XMLManager();
 }