Beispiel #1
0
 /// <summary>
 /// Appends an ordering to the selection.
 /// </summary>
 /// <param name="direction">The order direction.</param>
 /// <param name="names">The member names to use for ordering.</param>
 /// <returns>The T.</returns>
 public ClassSelect <T> ThenBy(EixoX.Data.SortDirection direction, params string[] names)
 {
     for (int i = 0; i < names.Length; i++)
     {
         this._OrderLast = this._OrderLast.SetNext(names[i], direction);
     }
     return(this);
 }
Beispiel #2
0
 /// <summary>
 /// Appends more ordering of the selection.
 /// </summary>
 /// <param name="direction">The sort diretion.</param>
 /// <param name="ordinals">The ordinals of the members to order by.</param>
 /// <returns>The T.</returns>
 public ClassSelect <T> ThenBy(EixoX.Data.SortDirection direction, params int[] ordinals)
 {
     for (int i = 0; i < ordinals.Length; i++)
     {
         this._OrderLast = this._OrderLast.SetNext(ordinals[i], direction);
     }
     return(this);
 }
Beispiel #3
0
 /// <summary>
 /// Sets the first ordering of the selection.
 /// </summary>
 /// <param name="direction">The sort diretion.</param>
 /// <param name="ordinals">The ordinals of the members to order by.</param>
 /// <returns>The T.</returns>
 public ClassSelect <T> OrderBy(EixoX.Data.SortDirection direction, params int[] ordinals)
 {
     this._OrderFirst = new ClassSortNode(_Aspect, ordinals[0], direction);
     this._OrderLast  = this._OrderFirst;
     for (int i = 1; i < ordinals.Length; i++)
     {
         this._OrderLast = this._OrderLast.SetNext(ordinals[i], direction);
     }
     return(this);
 }
Beispiel #4
0
 /// <summary>
 /// Sets the first ordering of the selection.
 /// </summary>
 /// <param name="direction">The order direction.</param>
 /// <param name="names">The member names to use for ordering.</param>
 /// <returns>The T.</returns>
 public ClassSelect <T> OrderBy(EixoX.Data.SortDirection direction, params string[] names)
 {
     this._OrderFirst = new ClassSortNode(_Aspect, names[0], direction);
     this._OrderLast  = this._OrderFirst;
     for (int i = 1; i < names.Length; i++)
     {
         this._OrderLast = this._OrderLast.SetNext(names[i], direction);
     }
     return(this);
 }
Beispiel #5
0
 public virtual void AppendSortNodes(StringBuilder builder, DataAspect aspect, ClassSortNode node)
 {
     AppendSort(builder, aspect, node.Term);
     if (node.Next != null)
     {
         builder.Append(", ");
         AppendSortNodes(builder, aspect, node.Next);
     }
 }
Beispiel #6
0
 public ClassSelect <T> OrderByRandom()
 {
     this._OrderFirst = new ClassSortNode(this._Aspect, -1, EixoX.Data.SortDirection.Random);
     this._OrderLast  = this._OrderFirst;
     return(this);
 }
Beispiel #7
0
 public ClassSortNode SetNext(string name, EixoX.Data.SortDirection direction)
 {
     this._next = new ClassSortNode(_Aspect, name, direction);
     return(this._next);
 }
Beispiel #8
0
 public ClassSortNode SetNext(int ordinal, EixoX.Data.SortDirection direction)
 {
     this._next = new ClassSortNode(_Aspect, ordinal, direction);
     return(this._next);
 }
Beispiel #9
0
 public ClassSortExpression(ClassSort sort)
 {
     this._First = new ClassSortNode(sort);
     this._Last  = this._First;
 }