Class SortDefinition<T>
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
Represents information about sorting in a MudDataGrid<T>.
public sealed record SortDefinition<T> : IEquatable<SortDefinition<T>>
Type Parameters
TThe type of item being sorted.
- Inheritance
-
SortDefinition<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
SortDefinition(string, bool, int, Func<T, object>, IComparer<object>?)
Represents information about sorting in a MudDataGrid<T>.
public SortDefinition(string SortBy, bool Descending, int Index, Func<T, object> SortFunc, IComparer<object>? Comparer = null)
Parameters
SortBystringThe name of the column to sort by.
DescendingboolWhen
true, sorts in descending order.IndexintThe order of this sort relative to other sort definitions.
SortFuncFunc<T, object>The custom function used to sort values.
ComparerIComparer<object>The comparer used to compare values.
Properties
Comparer
The comparer used to compare values.
public IComparer<object>? Comparer { get; init; }
Property Value
Descending
When true, sorts in descending order.
public bool Descending { get; init; }
Property Value
Index
The order of this sort relative to other sort definitions.
public int Index { get; init; }
Property Value
SortBy
The name of the column to sort by.
public string SortBy { get; init; }
Property Value
SortFunc
The custom function used to sort values.
public Func<T, object> SortFunc { get; init; }
Property Value
Methods
Deconstruct(out string, out bool, out int, out Func<T, object>, out IComparer<object>?)
public void Deconstruct(out string SortBy, out bool Descending, out int Index, out Func<T, object> SortFunc, out IComparer<object>? Comparer)
Parameters
Equals(SortDefinition<T>?)
public bool Equals(SortDefinition<T>? other)
Parameters
otherSortDefinition<T>
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(SortDefinition<T>?, SortDefinition<T>?)
public static bool operator ==(SortDefinition<T>? left, SortDefinition<T>? right)
Parameters
leftSortDefinition<T>rightSortDefinition<T>
Returns
operator !=(SortDefinition<T>?, SortDefinition<T>?)
public static bool operator !=(SortDefinition<T>? left, SortDefinition<T>? right)
Parameters
leftSortDefinition<T>rightSortDefinition<T>