private static int ComparePeptideTimes(GraphPointData p1, GraphPointData p2) { if (ReferenceEquals(p1.NodePep, p2.NodePep)) { return(Peptide.CompareGroups(p1.NodeGroup, p2.NodeGroup)); } return(Comparer.Default.Compare(p1.TimePepCharge, p2.TimePepCharge)); }