| | 1 | | using Plainquire.Filter.Abstractions; |
| | 2 | | using System; |
| | 3 | | using System.Collections.Generic; |
| | 4 | |
|
| | 5 | | namespace Plainquire.Filter; |
| | 6 | |
|
| | 7 | | /// <summary> |
| | 8 | | /// Exception is thrown when a filter expression cannot be created |
| | 9 | | /// </summary> |
| | 10 | | /// <seealso cref="Exception"/> |
| | 11 | | [Serializable] /* Required, see https://github.com/JamesNK/Newtonsoft.Json/issues/1622 */ |
| | 12 | | public class FilterExpressionException : Exception |
| | 13 | | { |
| | 14 | | /// <summary> |
| | 15 | | /// The type of the filtered entity. |
| | 16 | | /// </summary> |
| | 17 | | public Type? FilteredEntity { get; set; } |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// The path to the filtered property. |
| | 21 | | /// </summary> |
| | 22 | | public string? FilteredProperty { get; set; } |
| | 23 | |
|
| | 24 | | /// <summary> |
| | 25 | | /// The type of the filtered property. |
| | 26 | | /// </summary> |
| | 27 | | public Type? FilteredPropertyType { get; set; } |
| | 28 | |
|
| | 29 | | /// <summary> |
| | 30 | | /// The operator used to filter. |
| | 31 | | /// </summary> |
| | 32 | | public FilterOperator? FilterOperator { get; set; } |
| | 33 | |
|
| | 34 | | /// <summary> |
| | 35 | | /// The value to be parsed. |
| | 36 | | /// </summary> |
| | 37 | | public object? Value { get; set; } |
| | 38 | |
|
| | 39 | | /// <summary> |
| | 40 | | /// The type of the value to be parsed. |
| | 41 | | /// </summary> |
| | 42 | | public Type? ValueType { get; set; } |
| | 43 | |
|
| | 44 | | /// <summary> |
| | 45 | | /// The supported filter operators for filtered property. |
| | 46 | | /// </summary> |
| | 47 | | public IEnumerable<FilterOperator> SupportedFilterOperators { get; set; } = Array.Empty<FilterOperator>(); |
| | 48 | |
|
| | 49 | | /// <summary>Initializes a new instance of the <see cref="T:FilterExpressionCreationException"/> class with a specif |
| | 50 | | /// <param name="message">The error message that explains the reason for the exception. </param> |
| | 51 | | /// <param name="innerException">The exception that is the cause of the current exception. If the <paramref name="in |
| | 52 | | public FilterExpressionException(string message, Exception? innerException = null) |
| 2193 | 53 | | : base(message, innerException) |
| | 54 | | { |
| 2193 | 55 | | } |
| | 56 | | } |