Search Results for

    Show / Hide Table of Contents
    View Source

    Class Ordering

    Represents ordering information.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public class Ordering

    Constructors

    View Source

    Ordering(String, Direction, String, Boolean)

    Initializes a new instance of the Ordering class.

    Declaration
    public Ordering(string orderBy, Direction direction = Direction.Ascending, string culture = null, bool isCustomField = false)
    Parameters
    Type Name Description
    System.String orderBy

    The name of the ordering field.

    Direction direction

    The ordering direction.

    System.String culture

    The (ISO) culture to consider when sorting multi-lingual fields.

    System.Boolean isCustomField

    A value indicating whether the ordering field is a custom user property.

    Remarks

    The orderBy can be null, meaning: not sorting. If it is the empty string, it becomes null.

    The culture can be the empty string, meaning: invariant. If it is null, it becomes the empty string.

    Properties

    View Source

    Culture

    Gets (ISO) culture to consider when sorting multi-lingual fields.

    Declaration
    public string Culture { get; }
    Property Value
    Type Description
    System.String
    View Source

    Direction

    Gets the ordering direction.

    Declaration
    public Direction Direction { get; }
    Property Value
    Type Description
    Direction
    View Source

    IsCustomField

    Gets a value indicating whether the ordering field is a custom user property.

    Declaration
    public bool IsCustomField { get; }
    Property Value
    Type Description
    System.Boolean
    View Source

    IsEmpty

    Gets a value indicating whether this ordering is the default ordering.

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    System.Boolean
    View Source

    IsInvariant

    Gets a value indicating whether the culture of this ordering is invariant.

    Declaration
    public bool IsInvariant { get; }
    Property Value
    Type Description
    System.Boolean
    View Source

    OrderBy

    Gets the name of the ordering field.

    Declaration
    public string OrderBy { get; }
    Property Value
    Type Description
    System.String

    Methods

    View Source

    By(String, Direction, String, Boolean)

    Creates a new instance of the Ordering class.

    Declaration
    public static Ordering By(string orderBy, Direction direction = Direction.Ascending, string culture = null, bool isCustomField = false)
    Parameters
    Type Name Description
    System.String orderBy

    The name of the ordering field.

    Direction direction

    The ordering direction.

    System.String culture

    The (ISO) culture to consider when sorting multi-lingual fields.

    System.Boolean isCustomField

    A value indicating whether the ordering field is a custom user property.

    Returns
    Type Description
    Ordering
    Remarks

    The orderBy can be null, meaning: not sorting. If it is the empty string, it becomes null.

    The culture can be the empty string, meaning: invariant. If it is null, it becomes the empty string.

    View Source

    ByDefault()

    Gets the default Ordering instance.

    Declaration
    public static Ordering ByDefault()
    Returns
    Type Description
    Ordering
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • Ordering(String, Direction, String, Boolean)
    • Properties
      • Culture
      • Direction
      • IsCustomField
      • IsEmpty
      • IsInvariant
      • OrderBy
    • Methods
      • By(String, Direction, String, Boolean)
      • ByDefault()
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX