Example #1
0
 public void AddMessenger(ApiMessengerResponseModel item)
 {
     if (!this.Messengers.Any(x => x.Id == item.Id))
     {
         this.Messengers.Add(item);
     }
 }
Example #2
0
        public virtual ApiMessengerRequestModel MapResponseToRequest(
            ApiMessengerResponseModel response)
        {
            var request = new ApiMessengerRequestModel();

            request.SetProperties(
                response.Date,
                response.FromUserId,
                response.MessageId,
                response.Time,
                response.ToUserId,
                response.UserId);
            return(request);
        }
Example #3
0
        public virtual ApiMessengerResponseModel MapRequestToResponse(
            int id,
            ApiMessengerRequestModel request)
        {
            var response = new ApiMessengerResponseModel();

            response.SetProperties(id,
                                   request.Date,
                                   request.FromUserId,
                                   request.MessageId,
                                   request.Time,
                                   request.ToUserId,
                                   request.UserId);
            return(response);
        }