Example #1
0
 public void AddDeployment(ApiDeploymentResponseModel item)
 {
     if (!this.Deployments.Any(x => x.Id == item.Id))
     {
         this.Deployments.Add(item);
     }
 }
        public virtual ApiDeploymentRequestModel MapResponseToRequest(
            ApiDeploymentResponseModel response)
        {
            var request = new ApiDeploymentRequestModel();

            request.SetProperties(
                response.ChannelId,
                response.Created,
                response.DeployedBy,
                response.DeployedToMachineIds,
                response.EnvironmentId,
                response.JSON,
                response.Name,
                response.ProjectGroupId,
                response.ProjectId,
                response.ReleaseId,
                response.TaskId,
                response.TenantId);
            return(request);
        }
        public virtual ApiDeploymentResponseModel MapRequestToResponse(
            string id,
            ApiDeploymentRequestModel request)
        {
            var response = new ApiDeploymentResponseModel();

            response.SetProperties(id,
                                   request.ChannelId,
                                   request.Created,
                                   request.DeployedBy,
                                   request.DeployedToMachineIds,
                                   request.EnvironmentId,
                                   request.JSON,
                                   request.Name,
                                   request.ProjectGroupId,
                                   request.ProjectId,
                                   request.ReleaseId,
                                   request.TaskId,
                                   request.TenantId);
            return(response);
        }