public DeviceComparer(DeviceProperty property, ListSortDirection direction) { if (!Enum.IsDefined(typeof(DeviceProperty), property)) { throw new ArgumentOutOfRangeException(nameof(property)); } if (!Enum.IsDefined(typeof(ListSortDirection), direction)) { throw new ArgumentOutOfRangeException(nameof(direction)); } sortProperty = property; sortDirection = direction; stringComparer = new NaturalStringComparer(App.defaultDisplayStringComparison); }