Esempio n. 1
0
        public ShowUserHome()
        {
            UserHomeView = Create.TestObjectFor<UserHomeView>();
            UserHomeView.Tweets = new ObservableCollection<Tweet>();

            UserHomePresenter = PresenterFactory.NewUserHomePresenter(UserHomeView);
        }
Esempio n. 2
0
 public static UserHomePresenter NewUserHomePresenter(UserHomeView View)
 {
     return new UserHomePresenter {
         View = View,
         UserService = Domain.ObjectFactory.NewUserService,
         TweetService = Domain.ObjectFactory.NewTweetService,
     };
 }
Esempio n. 3
0
        /// <summary>
        /// Indexes the specified username.
        /// </summary>
        /// <returns></returns>
        public ActionResult Index()
        {
            IDictionary <string, string> crumbs = new Dictionary <string, string> {
                { "home", UrlService.UserRoot() }
            };
            List <Media> mediae = _mediaRepository.Retrieve25RecentPhotosByUserId(Owner.Id);

            string key = _persistentCollectionService.Set(Authorization.Owner.Username + "_userIndex", mediae, Persistence.Temporary);

            _persistentCollectionService.SetBackUrl(Authorization.Owner.Username, SiteCookie);

            UserHomeView view = ModelFactory <UserHomeView>(new { Media = mediae, Set = key });

            _sidebarView.PopulateView(view, Owner);

            return(View(view, crumbs));
        }