예제 #1
0
 public void AddArtifact(ApiArtifactResponseModel item)
 {
     if (!this.Artifacts.Any(x => x.Id == item.Id))
     {
         this.Artifacts.Add(item);
     }
 }
        public virtual ApiArtifactRequestModel MapResponseToRequest(
            ApiArtifactResponseModel response)
        {
            var request = new ApiArtifactRequestModel();

            request.SetProperties(
                response.Created,
                response.EnvironmentId,
                response.Filename,
                response.JSON,
                response.ProjectId,
                response.RelatedDocumentIds,
                response.TenantId);
            return(request);
        }
        public virtual ApiArtifactResponseModel MapRequestToResponse(
            string id,
            ApiArtifactRequestModel request)
        {
            var response = new ApiArtifactResponseModel();

            response.SetProperties(id,
                                   request.Created,
                                   request.EnvironmentId,
                                   request.Filename,
                                   request.JSON,
                                   request.ProjectId,
                                   request.RelatedDocumentIds,
                                   request.TenantId);
            return(response);
        }