public int Compare(ActionBase x, ActionBase y) { if (x == null || y == null) { return(0); } return(ActionComparerHelper.CompareByIndexAndName(x, y)); }
public int Compare(ActionBase x, ActionBase y) { if (x == null || y == null) { return(0); } var xType = GetContentType(x); var yType = GetContentType(y); var xIsContainer = IsContainer(xType); var yIsContainer = IsContainer(yType); if (xIsContainer && !yIsContainer) { return(-1); } if (!xIsContainer && yIsContainer) { return(1); } return(ActionComparerHelper.CompareByIndexAndText(x, y)); }