Exemplo n.º 1
0
        public OrderExitOperation(Order order)
        {
            IsAsc = order.ToString().EndsWith("asc");
            IsDesc = order.ToString().EndsWith("desc");

            Preconditions.CheckState(IsAsc || IsDesc);

            //this.order = order;
            propertyName = GetSortingProperty(order);
        }
Exemplo n.º 2
0
 private static string GetSortingProperty(Order order)
 {
     /**
      * This method relies on the format that Order is using:
      * propertyName + ' ' + (ascending?"asc":"desc")
      */
     string str = order.ToString();
     return str.Substring(0, str.IndexOf(' '));
 }
Exemplo n.º 3
0
 private static bool IsAscending(Order order)
 {
     return order.ToString().ToUpper().EndsWith("ASC");
 }