예제 #1
0
 public void AddWorkerTaskLease(ApiWorkerTaskLeaseResponseModel item)
 {
     if (!this.WorkerTaskLeases.Any(x => x.Id == item.Id))
     {
         this.WorkerTaskLeases.Add(item);
     }
 }
예제 #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);
        }
예제 #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);
        }