/// <summary> /// Gets the row enumerator. /// </summary> /// <returns> /// The row enumerator /// </returns> internal IEnumerable <int> GetRowEnumerator() { IEnumerable <int> enumerator = Enumerable.Range(0, this.Rows); switch (this.rowSortContainer.SortType) { case SortType.SortBySums: enumerator = ArrayHelpers.GetIndicesFromRowSums(this.RowSums); if (this.rowSortContainer.SortDirection == SortDirection.Descending) { enumerator = enumerator.Reverse(); } break; case SortType.Custom: enumerator = this.rowSortContainer.CustomSortOrder; break; } return(enumerator); }