public static List <int> GetColumns(Expression expression, ColumnExtractionModes columnExtractionModes)
        {
            var gatherer = new ColumnGatherer(columnExtractionModes);

            gatherer.Visit(expression);
            var distinct = gatherer.DistinctValues
        ? gatherer.columns.Select(p => p.First).Distinct()
        : gatherer.columns.Select(p => p.First);
            var ordered = gatherer.OrderedValues
        ? distinct.OrderBy(i => i)
        : distinct;

            return(ordered.ToList());
        }
 public List <Pair <int, Expression> > GetColumnsAndExpressions(ColumnExtractionModes columnExtractionModes)
 {
     return(ColumnGatherer.GetColumnsAndExpressions(Item, columnExtractionModes));
 }
 public List <int> GetColumns(ColumnExtractionModes columnExtractionModes)
 {
     return(ColumnGatherer.GetColumns(Item, columnExtractionModes));
 }
        // Constructors

        private ColumnGatherer(ColumnExtractionModes columnExtractionModes)
        {
            this.columnExtractionModes = columnExtractionModes;
        }
 public List <int> GetColumns(ColumnExtractionModes columnExtractionModes) =>
 ColumnGatherer.GetColumns(Item, columnExtractionModes);