public LinqDirectedOrderByBodyBuilder(ILinqBodyBuilderParent root, IExpression orderKey, LinqOrderByDirection direction) : base(root, orderKey) { this.Direction = direction; }
public ILinqOrderedBodyBuilder OrderBy(IExpression orderingKey, LinqOrderByDirection direction) { return(new LinqDirectedOrderByBodyBuilder(this, orderingKey, direction)); }
/// <summary> /// Adds an ordering pair to the /// <see cref="ILinqOrderingPairCollection"/> /// with the <paramref name="orderingKey"/> and /// <paramref name="direction"/> provided. /// </summary> /// <param name="orderingKey">The <see cref="IExpression"/> /// used to coerce the ordering of the output data set.</param> /// <param name="direction"> /// The <see cref="LinqOrderByDirection"/> which denotes /// whether to consider largest values first /// (<see cref="LinqOrderByDirection.Descending"/>) or /// smallest values first /// (<see cref="LinqOrderByDirection.Ascending"/> (default)).</param> /// <exception cref="System.ArgumentNullException">thrown /// when <paramref name="orderingKey"/> is null.</exception> /// <exception cref="System.ArgumentOutOfRangeException">thrown /// when <paramref name="direction"/> is neither /// <see cref="LinqOrderByDirection.Ascending"/> or /// <see cref="LinqOrderByDirection.Descending"/>.</exception> public void Add(IExpression orderingKey, LinqOrderByDirection direction) { base.baseList.Add(new LinqOrderingPair(orderingKey, direction)); }
/// <summary> /// Creates, inserts, and returns a new <see cref="ILinqOrderByClause"/> which /// defines a key selector for the expression used to compare across the series /// to order it. /// </summary> /// <param name="orderKey">The <see cref="IExpression"/> which determines /// the ordering key for comparison to order the data series.</param> /// <param name="direction">The <see cref="LinqOrderByDirection"/> /// for the <see cref="ILinqOrderByClause"/>.</param> /// <returns>An <see cref="ILinqOrderByClause"/> instance which /// defines the new clause.</returns> public ILinqOrderByClause OrderBy(IExpression orderKey, LinqOrderByDirection direction) { return(this.OrderBy(new LinqOrderingPair(orderKey, direction))); }
/// <summary> /// Creates a new <see cref="LinqOrderingPair"/> with the /// <paramref name="orderingKey"/> and <paramref name="direction"/> /// provided. /// </summary> /// <param name="orderingKey">The <see cref="IExpression"/> /// used to coerce the ordering of the output data set.</param> /// <param name="direction"> /// The <see cref="LinqOrderByDirection"/> which denotes /// whether to consider largest values first /// (<see cref="LinqOrderByDirection.Descending"/>) or /// smallest values first /// (<see cref="LinqOrderByDirection.Ascending"/> (default)). /// </param> public LinqOrderingPair(IExpression orderingKey, LinqOrderByDirection direction) : this() { this.OrderingKey = orderingKey; this.Direction = direction; }
public LinqDirectedThenByBodyBuilder(ILinqBodyBuilderParent root, IExpression orderKey, LinqOrderByDirection direction) : base(root, orderKey, direction) { }