Inheritance: ThingData, ICreated, IVotable
コード例 #1
0
 public LinkViewModel(ViewModelBase context, Link link)
 {
     Context = context;
     Link = link;
     Comments = new CommentsViewModel(this, link);
     _content = new Lazy<ContentViewModel>(() => SnooStream.ViewModel.Content.ContentViewModel.MakeContentViewModel(link.Url, link.Title, this, link.Thumbnail));
 }
コード例 #2
0
        public CommentsViewModel(ViewModelBase context, Link linkData)
        {
            _context = context;
            Link = _context as LinkViewModel;
            _loadFullSentinel = new LoadFullCommentsViewModel(this);
            FlatComments = new ObservableCollection<ViewModelBase>();
            ProcessUrl((linkData.Permalink.Contains("://") && linkData.Permalink.Contains("reddit.com")) ?
				linkData.Permalink :
				"http://www.reddit.com" + linkData.Permalink);
			_commentsContentStream = new Lazy<CommentsContentStreamViewModel>(() => new CommentsContentStreamViewModel(this));
        }
コード例 #3
0
        //need to add load helpers here for kicking off preview loads when we get near things

        internal void MergeLink(Link link)
        {
            Votable.MergeVotable(link);
            Link.CommentCount = link.CommentCount;
            RaisePropertyChanged("CommentCount");
        }