public TweetAnalytics UpdateAnalytics(TweetDetails tweetDetails) { TotalTweetsRecieved += 1; if (tweetDetails.HasPhoto) { NoOfTweetsWithPhotos += 1; } if (tweetDetails.HasHashTag) { NoOfTweetsWithHashTags += 1; } if (tweetDetails.HasUrl) { NoOfTweetsWithUrls += 1; } if (tweetDetails.HasEmoji) { NoOfTweetsWithEmojis += 1; } return(this); }
public TweetAnalytics(TweetDetails tweetDetails) { StreamStartTime = DateTime.UtcNow; UpdateAnalytics(tweetDetails); }