Class SortOption
- Namespace
- PnP.Core.Model.SharePoint
- Assembly
- PnP.Core.dll
Defines a field to be used for sorting search query results
public class SortOption
- Inheritance
-
SortOption
- Inherited Members
Constructors
SortOption(string)
Creates SortOption class, defaults to ascending sort order
public SortOption(string property)
Parameters
propertystringProperty to sort on
SortOption(string, SortDirection)
Creates SortOption class
public SortOption(string property, SortDirection sort)
Parameters
propertystringProperty to sort on
sortSortDirectionSort order to use
Properties
Property
Property to sort on
public string Property { get; }
Property Value
Sort
Sort order to use
public SortDirection Sort { get; }
Property Value
Methods
ToString()
Returns the sort option so it can be used in a search query
public override string ToString()
Returns
- string
Sort option to use in a query