< Summary

Information
Class: Fluorite.Strainer.Models.StrainerOptions
Assembly: Fluorite.Strainer
File(s): /builds/fluorite/strainer/src/Strainer/Models/StrainerOptions.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 78
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_DefaultPageNumber()100%11100%
get_DefaultPageSize()100%11100%
get_DefaultSortingWay()100%11100%
get_IsCaseInsensitiveForValues()100%11100%
get_MaxPageSize()100%11100%
get_MetadataSourceType()100%11100%
get_ThrowExceptions()100%11100%

File(s)

/builds/fluorite/strainer/src/Strainer/Models/StrainerOptions.cs

#LineLine coverage
 1using Fluorite.Strainer.Models.Metadata;
 2using Fluorite.Strainer.Models.Sorting;
 3
 4namespace Fluorite.Strainer.Models;
 5
 6/// <summary>
 7/// Represents options used by Strainer.
 8/// </summary>
 9public class StrainerOptions
 10{
 11    /// <summary>
 12    /// Initializes a new instance of the <see cref="StrainerOptions"/> class.
 13    /// </summary>
 14414    public StrainerOptions()
 15    {
 16
 14417    }
 18
 19    /// <summary>
 20    /// Gets or sets a default page number.
 21    /// <para/>
 22    /// Defaults to 1.
 23    /// </summary>
 15224    public int DefaultPageNumber { get; set; } = 1;
 25
 26    /// <summary>
 27    /// Gets or sets a default page size.
 28    /// <para/>
 29    /// Defaults to 10.
 30    /// </summary>
 15631    public int DefaultPageSize { get; set; } = 10;
 32
 33    /// <summary>
 34    /// Gets or sets a default sorting way used when applying default
 35    /// sorting.
 36    /// <para/>
 37    /// Defaults to <see cref="SortingWay.Ascending"/>.
 38    /// </summary>
 16039    public SortingWay DefaultSortingWay { get; set; } = SortingWay.Ascending;
 40
 41    /// <summary>
 42    /// Gets or sets a value indicating whether
 43    /// Strainer should operate in case insensitive mode when comparing values.
 44    /// <para/>
 45    /// This for example affects the way of comparing value of incoming filter
 46    /// with actual property value.
 47    /// <para/>
 48    /// Defaults to <see langword="false"/>.
 49    /// </summary>
 1150    public bool IsCaseInsensitiveForValues { get; set; } = false;
 51
 52    /// <summary>
 53    /// Gets or sets a maximum page number.
 54    /// <para/>
 55    /// Defaults to 50.
 56    /// </summary>
 16257    public int MaxPageSize { get; set; } = 50;
 58
 59    /// <summary>
 60    /// Gets or sets the type of sources Strainer will look through
 61    /// when obtaining property metadata.
 62    /// <para/>
 63    /// Note: narrowing down type of metadata source can speed up Strainer
 64    /// processing performance.
 65    /// <para/>
 66    /// Defaults to <see cref="MetadataSourceType.All"/>.
 67    /// </summary>
 26868    public MetadataSourceType MetadataSourceType { get; set; } = MetadataSourceType.All;
 69
 70    /// <summary>
 71    /// Gets or sets a value indicating whether
 72    /// Strainer should throw <see cref="Exceptions.StrainerException"/>
 73    /// and the like.
 74    /// <para/>
 75    /// Defaults to <see langword="false"/>.
 76    /// </summary>
 1677    public bool ThrowExceptions { get; set; } = false;
 78}