Esempio n. 1
0
 public void AddOctopusServerNode(ApiOctopusServerNodeResponseModel item)
 {
     if (!this.OctopusServerNodes.Any(x => x.Id == item.Id))
     {
         this.OctopusServerNodes.Add(item);
     }
 }
        public virtual ApiOctopusServerNodeRequestModel MapResponseToRequest(
            ApiOctopusServerNodeResponseModel response)
        {
            var request = new ApiOctopusServerNodeRequestModel();

            request.SetProperties(
                response.IsInMaintenanceMode,
                response.JSON,
                response.LastSeen,
                response.MaxConcurrentTasks,
                response.Name,
                response.Rank);
            return(request);
        }
        public virtual ApiOctopusServerNodeResponseModel MapRequestToResponse(
            string id,
            ApiOctopusServerNodeRequestModel request)
        {
            var response = new ApiOctopusServerNodeResponseModel();

            response.SetProperties(id,
                                   request.IsInMaintenanceMode,
                                   request.JSON,
                                   request.LastSeen,
                                   request.MaxConcurrentTasks,
                                   request.Name,
                                   request.Rank);
            return(response);
        }