public static int CompareByDoneRatio(IssueListItem item1, IssueListItem item2) { var data1 = item1.DataContext.DoneRatio; var data2 = item2.DataContext.DoneRatio; return(data1.CompareTo(data2)); }
public static int CompareByCreatedOn(IssueListItem item1, IssueListItem item2) { var data1 = item1.DataContext.CreatedOn; var data2 = item2.DataContext.CreatedOn; return(data1.CompareTo(data2)); }
public static int CompareById(IssueListItem item1, IssueListItem item2) { var data1 = item1.DataContext.Id; var data2 = item2.DataContext.Id; return(data1.CompareTo(data2)); }
public static int CompareBySubject(IssueListItem item1, IssueListItem item2) { var data1 = item1.DataContext.Subject; var data2 = item2.DataContext.Subject; if (data1 == data2) { return(0); } if (data1 == null) { return(1); } else if (data2 == null) { return(-1); } return(string.Compare(data1, data2)); }
public static int CompareByAuthor(IssueListItem item1, IssueListItem item2) { var data1 = item1.DataContext.Author; var data2 = item2.DataContext.Author; if (data1 == data2) { return(0); } if (data1 == null) { return(1); } else if (data2 == null) { return(-1); } return(string.Compare(data1.Name, data2.Name)); }
public static int CompareByPriority(IssueListItem item1, IssueListItem item2) { var data1 = item1.DataContext.Priority; var data2 = item2.DataContext.Priority; if (data1 == data2) { return(0); } if (data1 == null) { return(1); } else if (data2 == null) { return(-1); } return(data1.Id.CompareTo(data2.Id)); }
public static int CompareByDueDate(IssueListItem item1, IssueListItem item2) { var data1 = item1.DataContext.DueDate; var data2 = item2.DataContext.DueDate; if (!data1.HasValue && !data2.HasValue) { return(0); } if (!data1.HasValue) { return(1); } else if (!data2.HasValue) { return(-1); } return(data1.Value.CompareTo(data2.Value)); }
private int Compare(IssueListItem item1, IssueListItem item2) { var data1 = item1.DataContext.CustomFields[_field]; var data2 = item2.DataContext.CustomFields[_field]; if (data1 == data2) { return(0); } if (data1 == null) { return(1); } else if (data2 == null) { return(-1); } return(string.Compare(data1, data2)); }
private bool TestItem(IssueListItem item, IssuesSearchOptions search) { var issue = item.DataContext; if (issue.Subject.Contains(search.Text)) { return(true); } int id; if (int.TryParse(search.Text, NumberStyles.Integer, CultureInfo.InvariantCulture, out id)) { if (issue.Id == id) { return(true); } } return(false); }