public override int CompareTo(Ust other) { if (other == null) { return(KindId); } var nodeTypeCompareResult = KindId - other.KindId; if (nodeTypeCompareResult != 0) { return(nodeTypeCompareResult); } var otherArrayCreation = (ArrayCreationExpression)other; int compareKeywordNewResult = (KeywordNew == null && otherArrayCreation.KeywordNew == null) ? 0 : KeywordNew?.CompareTo(otherArrayCreation.KeywordNew) ?? -1; if (compareKeywordNewResult != 0) { return(compareKeywordNewResult); } int compareSizesResult = Sizes.CompareTo(otherArrayCreation.Sizes); if (compareSizesResult != 0) { return(compareSizesResult); } return(Initializers.CompareTo(otherArrayCreation.Initializers)); }
public override int CompareTo(Ust other) { if (other == null) { return((int)KindId); } var nodeTypeCompareResult = KindId - other.KindId; if (nodeTypeCompareResult != 0) { return(nodeTypeCompareResult); } var otherArrayCreation = (ArrayCreationExpression)other; int compareSizesResult = Sizes.CompareTo(otherArrayCreation.Sizes); if (compareSizesResult != 0) { return(compareSizesResult); } return(Initializers.CompareTo(otherArrayCreation.Initializers)); }