/// <summary>
 /// Initializes a new instance of the <see cref="ProjectVersion"/> class.
 /// </summary>
 /// <param name="projectVersionData">Project version data.</param>
 internal ProjectVersion(MantisConnectWebservice.ProjectVersionData projectVersionData)
 {
     this.Id          = Convert.ToInt32(projectVersionData.id);
     this.Name        = projectVersionData.name;
     this.ProjectId   = Convert.ToInt32(projectVersionData.project_id);
     this.DateOrder   = projectVersionData.date_order;
     this.Description = projectVersionData.description;
     this.IsReleased  = projectVersionData.released;
 }
        /// <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.ProjectVersionData ToWebservice()
        {
            MantisConnectWebservice.ProjectVersionData projectVersionData = new MantisConnectWebservice.ProjectVersionData();

            projectVersionData.id                  = this.Id.ToString();
            projectVersionData.project_id          = this.ProjectId.ToString();
            projectVersionData.description         = this.Description;
            projectVersionData.name                = this.Name;
            projectVersionData.released            = this.IsReleased;
            projectVersionData.releasedSpecified   = true;
            projectVersionData.date_order          = this.DateOrder;
            projectVersionData.date_orderSpecified = true;

            return(projectVersionData);
        }
        /// <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.ProjectVersionData ToWebservice()
        {
            MantisConnectWebservice.ProjectVersionData projectVersionData = new MantisConnectWebservice.ProjectVersionData();

            projectVersionData.id = this.Id.ToString();
            projectVersionData.project_id = this.ProjectId.ToString();
            projectVersionData.description = this.Description;
            projectVersionData.name = this.Name;
            projectVersionData.released = this.IsReleased;
            projectVersionData.releasedSpecified = true;
            projectVersionData.date_order = this.DateOrder;
            projectVersionData.date_orderSpecified = true;

            return projectVersionData;
        }