Esempio n. 1
0
 /// <summary>
 /// Sets the order by expression.
 /// </summary>
 /// <param name="orderByExpression">The order by expression.</param>
 /// <exception cref="System.ArgumentException">'orderByExpression' can be applied only once.;orderByExpression</exception>
 public void SetOrderByExpression(OrderByExpression orderByExpression)
 {
     Check.NotNull(orderByExpression, nameof(orderByExpression));
     if (this.OrderByExpression != null)
     {
         throw new ArgumentException("'orderByExpression' can be applied only once.", "orderByExpression");
     }
     this.OrderByExpression = orderByExpression;
 }
Esempio n. 2
0
 /// <summary>
 /// Sets the order by expression.
 /// </summary>
 /// <param name="orderByExpression">The order by expression.</param>
 /// <exception cref="System.ArgumentException">'orderByExpression' can be applied only once.;orderByExpression</exception>
 public void SetOrderByExpression(OrderByExpression orderByExpression)
 {
     Check.NotNull(orderByExpression, nameof(orderByExpression));
     if (OrderByExpression != null)
     {
         throw new ArgumentException(string.Format(Resources.ExpressionCanBeAppliedOnlyOnce, nameof(OrderByExpression)),
                                     nameof(orderByExpression));
     }
     OrderByExpression = orderByExpression;
 }