/// <summary>Compares to SpiraProjects and returns whether they are equal or not.</summary> /// <param name="inProject1">One of the SpiraProjects to compare.</param> /// <param name="inProject2">Another SpiraProject to compare.</param> /// <returns>True if the settings are the same, false if not.</returns> public bool IsEqual(SpiraProject inProject1, SpiraProject inProject2) { if (inProject2.ServerURL.AbsoluteUri.Trim() == inProject1.ServerURL.AbsoluteUri.Trim() && inProject2.UserName == inProject1.UserName && inProject2.ProjectId == inProject1.ProjectId) { return(true); } else { return(false); } }
/// <summary>Compares this SpiraProject to the specified project. True if the projects are the same. False if not.</summary> /// <param name="inProject">SpiraProject to compare this object against.</param> /// <returns>True if the settings are the same, false if not.</returns> public bool IsEqualTo(SpiraProject inProject) { if (this.ServerURL.AbsoluteUri.Trim() == inProject.ServerURL.AbsoluteUri.Trim() && this.UserName == inProject.UserName && this.ProjectId == inProject.ProjectId) { return(true); } else { return(false); } }
/// <summary>Returns a savable string from a project object.</summary> /// <param name="inProject">The SpiraProject to convert.</param> /// <returns>A string of the fields seperated by the field seperator.</returns> public static string GenerateToString(SpiraProject inProject) { if (inProject != null) { return(inProject.UserName + SpiraProject.CHAR_FIELD + inProject.UserPass + SpiraProject.CHAR_FIELD + inProject.ServerURL.AbsoluteUri + SpiraProject.CHAR_FIELD + inProject.ProjectId.ToString() + SpiraProject.CHAR_FIELD + inProject.ProjectName + SpiraProject.CHAR_FIELD + inProject.UserID.ToString()); } else { return(null); } }