コード例 #1
0
ファイル: ShowUserHome.cs プロジェクト: msuarz/zunzun
        public ShowUserHome()
        {
            UserHomeView = Create.TestObjectFor<UserHomeView>();
            UserHomeView.Tweets = new ObservableCollection<Tweet>();

            UserHomePresenter = PresenterFactory.NewUserHomePresenter(UserHomeView);
        }
コード例 #2
0
ファイル: PresenterFactory.cs プロジェクト: msuarz/zunzun
 public static UserHomePresenter NewUserHomePresenter(UserHomeView View)
 {
     return new UserHomePresenter {
         View = View,
         UserService = Domain.ObjectFactory.NewUserService,
         TweetService = Domain.ObjectFactory.NewTweetService,
     };
 }
コード例 #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));
        }