| | | 1 | | // ----------------------------------------------------------------------- |
| | | 2 | | // <copyright file="DoubleFilterViewModel.cs" company="Stéphane ANDRE"> |
| | | 3 | | // Copyright (c) Stéphane ANDRE. All rights reserved. |
| | | 4 | | // </copyright> |
| | | 5 | | // ----------------------------------------------------------------------- |
| | | 6 | | |
| | | 7 | | using System; |
| | | 8 | | using System.Linq.Expressions; |
| | | 9 | | using MyNet.Primitives; |
| | | 10 | | |
| | | 11 | | namespace MyNet.UI.ViewModels.List.Filtering.Filters; |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Filter view model for double (floating-point) properties. |
| | | 15 | | /// Supports range filtering (from/to) and various comparison operators. |
| | | 16 | | /// </summary> |
| | | 17 | | /// <typeparam name="T">The type of the items being filtered.</typeparam> |
| | | 18 | | /// <param name="propertyName">The key that identifies this filter condition.</param> |
| | | 19 | | /// <param name="property">The expression representing the double property to filter on.</param> |
| | | 20 | | /// <param name="comparableOperator">The comparison operator to use (default: EqualsTo).</param> |
| | | 21 | | public class DoubleFilterViewModel<T>( |
| | | 22 | | string propertyName, |
| | | 23 | | Expression<Func<T, double>> property, |
| | | 24 | | ComplexComparableOperator comparableOperator = ComplexComparableOperator.EqualsTo) |
| | 0 | 25 | | : ComparableFilterViewModel<T, double>(propertyName, property, comparableOperator); |
| | | 26 | | |