< Summary

Information
Class: Fluorite.Strainer.Models.Filtering.Operators.FilterExpressionContext
Assembly: Fluorite.Strainer
File(s): /builds/fluorite/strainer/src/Strainer/Models/Filtering/Operators/FilterExpressionContext.cs
Line coverage
100%
Covered lines: 17
Uncovered lines: 0
Coverable lines: 17
Total lines: 65
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_FilterValue()100%11100%
get_IsCaseInsensitiveForValues()100%11100%
get_IsMaterializedQueryable()100%11100%
get_IsStringBasedProperty()100%11100%
get_PropertyValue()100%11100%

File(s)

/builds/fluorite/strainer/src/Strainer/Models/Filtering/Operators/FilterExpressionContext.cs

#LineLine coverage
 1using System.Linq.Expressions;
 2
 3namespace Fluorite.Strainer.Models.Filtering.Operators;
 4
 5/// <summary>
 6/// Represents default information context for filter expression.
 7/// </summary>
 8public class FilterExpressionContext : IFilterExpressionContext
 9{
 10    /// <summary>
 11    /// Initializes a new instance of the <see cref="FilterExpressionContext"/>
 12    /// class.
 13    /// </summary>
 14    /// <param name="filterValue">
 15    /// The filter value expression.
 16    /// </param>
 17    /// <param name="propertyValue">
 18    /// The property access expression.
 19    /// </param>
 20    /// <param name="isCaseInsensitiveForValues">
 21    /// Gets a value indicating whether Strainer should operate in case insensitive mode
 22    /// when comparing values.
 23    /// </param>
 24    /// <param name="isMaterializedQueryable">
 25    /// A value indicating whether associated <see cref="IQueryable"/>
 26    /// is in fact a already materialized collection.
 27    /// </param>
 28    /// <param name="isStringBasedProperty">
 29    /// Gets a value indicating whether targeted property is string based.
 30    /// </param>
 31    /// <exception cref="ArgumentNullException">
 32    /// <paramref name="filterValue"/> is <see langword="null"/>.
 33    /// </exception>
 34    /// <exception cref="ArgumentNullException">
 35    /// <paramref name="propertyValue"/> is <see langword="null"/>.
 36    /// </exception>
 32237    public FilterExpressionContext(
 32238        Expression filterValue,
 32239        Expression propertyValue,
 32240        bool isCaseInsensitiveForValues,
 32241        bool isMaterializedQueryable,
 32242        bool isStringBasedProperty)
 43    {
 32244        FilterValue = Guard.Against.Null(filterValue);
 32245        PropertyValue = Guard.Against.Null(propertyValue);
 32246        IsCaseInsensitiveForValues = isCaseInsensitiveForValues;
 32247        IsMaterializedQueryable = isMaterializedQueryable;
 32248        IsStringBasedProperty = isStringBasedProperty;
 32249    }
 50
 51    /// <inheritdoc/>
 32152    public Expression FilterValue { get; }
 53
 54    /// <inheritdoc/>
 7455    public bool IsCaseInsensitiveForValues { get; }
 56
 57    /// <inheritdoc/>
 29658    public bool IsMaterializedQueryable { get; }
 59
 60    /// <inheritdoc/>
 2061    public bool IsStringBasedProperty { get; }
 62
 63    /// <inheritdoc/>
 32164    public Expression PropertyValue { get; }
 65}