Пример #1
0
        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);
        }
Пример #2
0