public Fields() { Priority = new Priority(); Assignee = new Assignee(); Status = new Status(); Description = string.Empty; Summary = string.Empty; Progress = new Progress(); Created = new DateTime(); TimeTracking = new TimeTracking(); ResolutionDate = string.Empty; DueDate = string.Empty; }
//public static bool operator == (Fields a, Fields b) //{ // return a.Equals(b); //} //public static bool operator != (Fields a, Fields b) //{ // return a.Equals(b); //} public bool Equals(Fields other) { if (other == null) { if (this == null) { return(true); } return(false); } bool assEqual = false; if (Assignee != null) { assEqual = Assignee.Equals(other.Assignee); } else { if (other.Assignee == null) { assEqual = true; } else { assEqual = false; } } bool priorityEqual = false; if (Priority != null) { priorityEqual = Priority.Equals(other.Priority); } else { if (other.Priority == null) { priorityEqual = true; } else { priorityEqual = false; } } bool statusEqual = false; if (Status != null) { statusEqual = Status.Equals(other.Status); } else { if (other.Status == null) { statusEqual = true; } else { statusEqual = false; } } return(priorityEqual && //Priority.Equals(other.Priority) && assEqual && statusEqual && //Status.Equals(other.Status) && string.Equals(Description, other.Description) && string.Equals(Summary, other.Summary)); }