/// <summary> /// Constructor to create a project from the web service project data. /// </summary> /// <param name="projectData">An instance returned by the webservice.</param> internal Project(MantisConnectWebservice.ProjectData projectData) { this.Id = Convert.ToInt32(projectData.id); this.Name = projectData.name; this.Status = new ObjectRef(projectData.status); this.Enabled = projectData.enabled; this.ViewState = new ObjectRef(projectData.view_state); this.AccessMin = new ObjectRef(projectData.access_min); this.FilePath = projectData.file_path; this.Description = projectData.description; }
/// <summary> /// Convert this instance to the type supported by the webservice proxy. /// </summary> /// <returns> /// A copy of this instance in the webservice proxy type. /// </returns> internal MantisConnectWebservice.ProjectData ToWebservice() { MantisConnectWebservice.ProjectData projectData = new MantisConnectWebservice.ProjectData(); projectData.id = this.Id.ToString(); projectData.name = this.Name; projectData.description = this.Description; projectData.enabled = this.Enabled; projectData.enabledSpecified = true; projectData.file_path = this.FilePath; projectData.view_state = this.ViewState.ToWebservice(); projectData.status = this.Status.ToWebservice(); // TODO: At the moment this is not used by project_add() or Mantis?! projectData.access_min = new MantisConnectWebservice.ObjectRef(); projectData.access_min.id = "0"; return(projectData); }
/// <summary> /// Convert this instance to the type supported by the webservice proxy. /// </summary> /// <returns>A copy of this instance in the webservice proxy type.</returns> internal MantisConnectWebservice.ProjectData ToWebservice() { MantisConnectWebservice.ProjectData projectData = new MantisConnectWebservice.ProjectData(); projectData.id = this.Id.ToString(); projectData.name = this.Name; projectData.description = this.Description; projectData.enabled = this.Enabled; projectData.enabledSpecified = true; projectData.file_path = this.FilePath; projectData.view_state = this.ViewState.ToWebservice(); projectData.status = this.Status.ToWebservice(); // TODO: At the moment this is not used by project_add() or Mantis?! projectData.access_min = new MantisConnectWebservice.ObjectRef(); projectData.access_min.id = "0"; return projectData; }