/// <summary>
 /// Gets a string representation of the given null placement.
 /// </summary>
 /// <param name="placement">The null placement to convert to a string.</param>
 /// <returns>The string representation.</returns>
 public string ToString(NullPlacement placement)
 {
     switch (placement)
     {
         case NullPlacement.First:
             return "NULLS FIRST";
         case NullPlacement.Last:
             return "NULLS LAST";
         default:
             throw new ArgumentException(Resources.UnknownNullPlacement, "placement");
     }
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of a OrderBy.
 /// </summary>
 /// <param name="projection">The item to sort by.</param>
 /// <param name="order">The order in which to sort the items.</param>
 /// <param name="nullPlacement">The placement of nulls in the results.</param>
 public OrderBy(
     IProjectionItem projection,
     Order order = Order.Default,
     NullPlacement nullPlacement = NullPlacement.Default)
 {
     if (projection == null)
     {
         throw new ArgumentNullException("projection");
     }
     Projection    = new AliasedProjection(projection, null);
     Order         = order;
     NullPlacement = nullPlacement;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of a OrderBy.
 /// </summary>
 /// <param name="projection">The item to sort by.</param>
 /// <param name="order">The order in which to sort the items.</param>
 /// <param name="nullPlacement">The placement of nulls in the results.</param>
 public OrderBy(
     IProjectionItem projection,
     Order order = Order.Default,
     NullPlacement nullPlacement = NullPlacement.Default)
 {
     if (projection == null)
     {
         throw new ArgumentNullException("projection");
     }
     Projection = new AliasedProjection(projection, null);
     Order = order;
     NullPlacement = nullPlacement;
 }
Пример #4
0
        /// <summary>
        /// Gets a string representation of the given null placement.
        /// </summary>
        /// <param name="placement">The null placement to convert to a string.</param>
        /// <returns>The string representation.</returns>
        public string ToString(NullPlacement placement)
        {
            switch (placement)
            {
            case NullPlacement.First:
                return("NULLS FIRST");

            case NullPlacement.Last:
                return("NULLS LAST");

            default:
                throw new ArgumentException("Encountered an unknown null placement.");
            }
        }
        /// <summary>
        /// Gets a string representation of the given null placement.
        /// </summary>
        /// <param name="placement">The null placement to convert to a string.</param>
        /// <returns>The string representation.</returns>
        public string ToString(NullPlacement placement)
        {
            switch (placement)
            {
            case NullPlacement.First:
                return("NULLS FIRST");

            case NullPlacement.Last:
                return("NULLS LAST");

            default:
                throw new ArgumentException(Resources.UnknownNullPlacement, "placement");
            }
        }