예제 #1
0
        public Tweeter FilterTweet(ITweet tweet)
        {
            ITweetEntities media = tweet.Entities;

            if (media.Medias.Count != 0)
            {
                return(null);
            }

            List <IHashtagEntity> hashTags = tweet.Hashtags;

            if (hashTags.Count == 0)
            {
                return(null);
            }

            List <IUrlEntity> urls = tweet.Urls;

            if (urls.Count > 0)
            {
                return(null);
            }

            string cleanText = Regex.Replace(tweet.FullText, @"[^\u0020,^\u0030-\u0039,^\u0041-\u005A,^\u0061-\u007A]+", string.Empty);

            //need to figureout what the difference is between text and full text
            Tweeter ourTweeter = new Tweeter(cleanText, tweet.Hashtags);

            return(ourTweeter);
        }
예제 #2
0
 private void DTOUpdated()
 {
     _createdBy = _tweetDTO == null ? null : _userFactory.GenerateUserFromDTO(_tweetDTO.CreatedBy);
     _entities  = _tweetDTO == null ? null : new TweetEntities(_tweetDTO, TweetMode);
 }
예제 #3
0
 private void DTOUpdated()
 {
     _createdBy = _tweetDTO == null ? null : _userFactory.GenerateUserFromDTO(_tweetDTO.CreatedBy);
     _entities = _tweetDTO == null ? null : new TweetEntities(_tweetDTO);
 }
예제 #4
0
 private void DTOUpdated()
 {
     _createdBy = _tweetDTO == null ? null : Client.Factories.CreateUser(_tweetDTO.CreatedBy);
     _entities  = _tweetDTO == null ? null : new TweetEntities(_tweetDTO, TweetMode);
 }