public CommentsViewModel(ViewModelBase context, string url) { _context = context; Link = _context as LinkViewModel; _loadFullSentinel = new LoadFullCommentsViewModel(this); FlatComments = new ObservableCollection<ViewModelBase>(); ProcessUrl(url); _commentsContentStream = new Lazy<CommentsContentStreamViewModel>(() => new CommentsContentStreamViewModel(this)); }
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)); }
public CommentsViewModel(ViewModelBase context, Listing comments, string url, DateTime? lastRefresh, bool isLimitedContext = false) { LastRefresh = lastRefresh; _context = context; Link = _context as LinkViewModel; _loadFullSentinel = new LoadFullCommentsViewModel(this); FlatComments = new ObservableCollection<ViewModelBase>(); ProcessUrl(url); _loadFullTask = new Lazy<Task>(() => Task.FromResult(true)); LoadDump(comments); _commentsContentStream = new Lazy<CommentsContentStreamViewModel>(() => new CommentsContentStreamViewModel(this)); }