Esempio n. 1
0
 private (int added, int updated) UpdateUserRecordCommentsInternal(string username, UserHistorySnapshot record)
 {
     var(added, updated, nextComments) = UpdateUserRecordContributionsInternal <CommentSnapshot, Comment>(
         username,
         record.Comments,
         c => new CommentSnapshot {
         FullName     = c.Fullname,
         Subreddit    = c.Subreddit,
         Score        = c.Score,
         Text         = c.Body,
         CreationTime = c.Created,
         Removed      = c.Removed,
     },
         () => redditClient.EnumerateUserCommentsBatchedTimeDescendingLimit1000ish(username),
         c => c.Created,
         c => c.Fullname,
         c => c.Subreddit,
         "comment");
     record.Comments = nextComments;
     return(added, updated);
 }