Esempio n. 1
0
 public void AddWorkerTaskLease(ApiWorkerTaskLeaseResponseModel item)
 {
     if (!this.WorkerTaskLeases.Any(x => x.Id == item.Id))
     {
         this.WorkerTaskLeases.Add(item);
     }
 }
Esempio n. 2
0
        public virtual ApiWorkerTaskLeaseRequestModel MapResponseToRequest(
            ApiWorkerTaskLeaseResponseModel response)
        {
            var request = new ApiWorkerTaskLeaseRequestModel();

            request.SetProperties(
                response.Exclusive,
                response.JSON,
                response.Name,
                response.TaskId,
                response.WorkerId);
            return(request);
        }
Esempio n. 3
0
        public virtual ApiWorkerTaskLeaseResponseModel MapRequestToResponse(
            string id,
            ApiWorkerTaskLeaseRequestModel request)
        {
            var response = new ApiWorkerTaskLeaseResponseModel();

            response.SetProperties(id,
                                   request.Exclusive,
                                   request.JSON,
                                   request.Name,
                                   request.TaskId,
                                   request.WorkerId);
            return(response);
        }