コード例 #1
0
        public virtual ApiPostClientResponseModel MapClientRequestToResponse(
            int id,
            ApiPostClientRequestModel request)
        {
            var response = new ApiPostClientResponseModel();

            response.SetProperties(id,
                                   request.AcceptedAnswerId,
                                   request.AnswerCount,
                                   request.Body,
                                   request.ClosedDate,
                                   request.CommentCount,
                                   request.CommunityOwnedDate,
                                   request.CreationDate,
                                   request.FavoriteCount,
                                   request.LastActivityDate,
                                   request.LastEditDate,
                                   request.LastEditorDisplayName,
                                   request.LastEditorUserId,
                                   request.OwnerUserId,
                                   request.ParentId,
                                   request.PostTypeId,
                                   request.Score,
                                   request.Tag,
                                   request.Title,
                                   request.ViewCount);
            return(response);
        }
コード例 #2
0
ファイル: ApiResponse.cs プロジェクト: codenesium/samples
 public void AddPost(ApiPostClientResponseModel item)
 {
     if (!this.Posts.Any(x => x.Id == item.Id))
     {
         this.Posts.Add(item);
     }
 }
コード例 #3
0
 public void SetWikiPostIdNavigation(ApiPostClientResponseModel value)
 {
     this.WikiPostIdNavigation = value;
 }
コード例 #4
0
 public void SetExcerptPostIdNavigation(ApiPostClientResponseModel value)
 {
     this.ExcerptPostIdNavigation = value;
 }
コード例 #5
0
 public void SetRelatedPostIdNavigation(ApiPostClientResponseModel value)
 {
     this.RelatedPostIdNavigation = value;
 }