예제 #1
0
 public void AddDirectTweet(ApiDirectTweetResponseModel item)
 {
     if (!this.DirectTweets.Any(x => x.TweetId == item.TweetId))
     {
         this.DirectTweets.Add(item);
     }
 }
        public virtual ApiDirectTweetRequestModel MapResponseToRequest(
            ApiDirectTweetResponseModel response)
        {
            var request = new ApiDirectTweetRequestModel();

            request.SetProperties(
                response.Content,
                response.Date,
                response.TaggedUserId,
                response.Time);
            return(request);
        }
        public virtual ApiDirectTweetResponseModel MapRequestToResponse(
            int tweetId,
            ApiDirectTweetRequestModel request)
        {
            var response = new ApiDirectTweetResponseModel();

            response.SetProperties(tweetId,
                                   request.Content,
                                   request.Date,
                                   request.TaggedUserId,
                                   request.Time);
            return(response);
        }