コード例 #1
0
        public JsonPatchDocument <ApiQuoteTweetRequestModel> CreatePatch(ApiQuoteTweetRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiQuoteTweetRequestModel>();

            patch.Replace(x => x.Content, model.Content);
            patch.Replace(x => x.Date, model.Date);
            patch.Replace(x => x.RetweeterUserId, model.RetweeterUserId);
            patch.Replace(x => x.SourceTweetId, model.SourceTweetId);
            patch.Replace(x => x.Time, model.Time);
            return(patch);
        }
コード例 #2
0
        public virtual ApiQuoteTweetRequestModel MapResponseToRequest(
            ApiQuoteTweetResponseModel response)
        {
            var request = new ApiQuoteTweetRequestModel();

            request.SetProperties(
                response.Content,
                response.Date,
                response.RetweeterUserId,
                response.SourceTweetId,
                response.Time);
            return(request);
        }