internal static SimpleTwitterCache GetInstance(ITrumpsTwitterService service, IRuntimeContext context) { if (instance == null) { instance = new SimpleTwitterCache(service, context); } return(instance); }
public List <ITweet> GetTrumpsTweets() { List <ITweet> rawTweets = SimpleTwitterCache.GetInstance(_service, _context).GetTweets(); List <ITweet> filteredTweets = new List <ITweet>(); if (!_context.AdultMessagesAllowed) { filteredTweets = rawTweets.FindAll(t => t.Classification != TweetClassification.sexualHarrasment); } else { filteredTweets = rawTweets; } return(filteredTweets); }