Search Results for

    Show / Hide Table of Contents

    Class QueryableSort

    Contains information on a property and direction to use to sort a collection of items

    Inheritance
    object
    QueryableSort
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Utils
    Assembly: LemonEdge.Utils.dll
    Syntax
    [DataContract]
    public class QueryableSort

    Constructors

    QueryableSort(string, Order)

    Creates a new QueryableSort specifying to sort a collection of items using the specified propertyName and sortDirection

    Declaration
    public QueryableSort(string propertyName, Order sortDirection)
    Parameters
    Type Name Description
    string propertyName

    The property name to sort a collection of items by

    Order sortDirection

    The direction to sort the set of items in against the values of the specified property name

    Properties

    PropertyName

    The name of the property on each item to sort by

    Declaration
    public string PropertyName { get; set; }
    Property Value
    Type Description
    string

    SortDirection

    The direction to sort items in the collection by

    Declaration
    public Order SortDirection { get; set; }
    Property Value
    Type Description
    Order

    Methods

    ParseSort(string, Func<string, string>)

    Creates a new set of QueryableSorts from a text string in the form PropName SortDirection, PropName2 SortDirection2, ...

    Declaration
    public static IEnumerable<QueryableSort> ParseSort(string orderByClause, Func<string, string> translatePropertyName = null)
    Parameters
    Type Name Description
    string orderByClause

    A string containing the method of ordering items in the form PropName SortDirection, PropName2 SortDirection2, ...

    Func<string, string> translatePropertyName

    An optional function to translate property names from an old property name into a new one

    Returns
    Type Description
    IEnumerable<QueryableSort>

    Creates a set of QueryableSorts for each PropName SortDirection set

    ToString()

    Provides a user friendly string of the sort direction of the form PropertyName SortDirection

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A user friendly string of the sort direction of the form PropertyName SortDirection

    Overrides
    object.ToString()

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)

    See Also

    QueryableExecuter
    QueryableExecuter<T>
    QueryableExecuter<T, TT>
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.