mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
* Don't check for null before * Don't try different formats when not needed (NumberFormat.Integer is the fast path)
24 lines
514 B
C#
24 lines
514 B
C#
#pragma warning disable CS1591
|
|
|
|
using System;
|
|
using Jellyfin.Data.Enums;
|
|
|
|
namespace MediaBrowser.Model.Dlna
|
|
{
|
|
public class SortCriteria
|
|
{
|
|
public SortCriteria(string sortOrder)
|
|
{
|
|
if (Enum.TryParse<SortOrder>(sortOrder, true, out var sortOrderValue))
|
|
{
|
|
SortOrder = sortOrderValue;
|
|
}
|
|
else
|
|
{
|
|
SortOrder = SortOrder.Ascending;
|
|
}
|
|
}
|
|
|
|
public SortOrder SortOrder { get; }
|
|
}
|
|
}
|