コード例 #1
0
ファイル: ApiResponse.g.cs プロジェクト: Vin2454/samples
 public void AddFollower(ApiFollowerResponseModel item)
 {
     if (!this.Followers.Any(x => x.Id == item.Id))
     {
         this.Followers.Add(item);
     }
 }
コード例 #2
0
        public virtual ApiFollowerRequestModel MapResponseToRequest(
            ApiFollowerResponseModel response)
        {
            var request = new ApiFollowerRequestModel();

            request.SetProperties(
                response.Blocked,
                response.DateFollowed,
                response.FollowRequestStatu,
                response.FollowedUserId,
                response.FollowingUserId,
                response.Muted);
            return(request);
        }
コード例 #3
0
        public virtual ApiFollowerResponseModel MapRequestToResponse(
            int id,
            ApiFollowerRequestModel request)
        {
            var response = new ApiFollowerResponseModel();

            response.SetProperties(id,
                                   request.Blocked,
                                   request.DateFollowed,
                                   request.FollowRequestStatu,
                                   request.FollowedUserId,
                                   request.FollowingUserId,
                                   request.Muted);
            return(response);
        }