DataFilter.Core 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DataFilter.Core --version 1.1.0
                    
NuGet\Install-Package DataFilter.Core -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DataFilter.Core" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DataFilter.Core" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="DataFilter.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DataFilter.Core --version 1.1.0
                    
#r "nuget: DataFilter.Core, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DataFilter.Core@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DataFilter.Core&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=DataFilter.Core&version=1.1.0
                    
Install as a Cake Tool

DataFilter.Core

The foundation of the DataFilter library, providing pure filtering logic, abstractions, and standard data models.

Structure

  • Abstractions: Defines IFilterEngine, IFilterDescriptor, IFilterContext, IAsyncDataProvider, etc.
  • Engine: Includes FilterExpressionBuilder for standard LINQ filter generation.
  • Models: Standardized FilterSnapshot, FilterPipelineSnapshot, SortDescriptor, and PagedResult.
  • Pipeline (Pipeline/): FilterPipeline, CriterionPipelineNode, GroupPipelineNode — editable graph for UI scenarios (order, named groups, toggles).
  • Services: FilterSnapshotBuilder, FilterPipelineCompiler, FilterPipelineSnapshotMapper, FilterPipelineInterop, FilterPipelineContextExtensions.

Key Concepts

Wildcards in text operators (*, ?)

Core text operators (Equals, NotEquals, Contains, NotContains, StartsWith, EndsWith) support wildcard patterns:

  • * matches any sequence of characters
  • ? matches a single character

This behavior is implemented in FilterEvaluator and FilterExpressionBuilder, so it applies consistently to in-memory filtering and compiled expressions. It also means persisted presets/snapshots that store a text operator + pattern will replay correctly without needing UI-specific logic.

FilterSnapshot

A serializable representation of a filtering state that can be passed between layers (e.g., from Blazor UI to Web API). Describes what is filtered using flat or nested FilterSnapshotEntry rows (including logical groups for Excel-style column scopes).

Filter pipeline

For applications that need an ordered list of criteria, named groups, enable/disable flags, and JSON presets, use the pipeline model:

Type Role
FilterPipeline Root list of nodes + RootCombineOperator (AND/OR between top-level nodes).
CriterionPipelineNode Leaf: property name, operator name (FilterOperator), and value (same shapes as FilterSnapshotEntry).
GroupPipelineNode Named group: DisplayName, CombineOperator, ordered Children.
FilterPipelineCompiler Walks enabled nodes and returns IReadOnlyList<IFilterDescriptor> (groups become FilterGroup with internal keys __group_{id}; multiple root OR branches compile to one FilterGroup with OR).
FilterPipelineSnapshot / FilterPipelineNodeDto Versioned DTO for System.Text.Json or other serializers.
FilterPipelineSnapshotMapper Maps between the graph and the DTO; normalizes JsonElement values after deserialization.
FilterPipelineInterop.FromLegacySnapshot Builds a FilterPipeline from an existing IFilterSnapshot (e.g. after using column filters).

Apply to runtime state with FilterContext.ReplaceDescriptors(FilterPipelineCompiler.Compile(pipeline)) or FilterPipelineContextExtensions.ApplyToContext(pipeline, filterContext). This replaces the entire descriptor list; it does not merge by property name (unlike AddOrUpdateDescriptor).

IAsyncDataProvider

Implement this interface to provide data asynchronously from any source (SQL, NoSQL, API).

public interface IAsyncDataProvider<T>
{
    Task<PagedResult<T>> FetchDataAsync(IFilterContext context, CancellationToken cancellationToken = default);
    Task<IEnumerable<object>> FetchDistinctValuesAsync(string propertyName, string searchText = "", CancellationToken cancellationToken = default);
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on DataFilter.Core:

Package Downloads
DataFilter.Filtering.ExcelLike

Package Description

DataFilter.PlatformShared

Package Description

DataFilter.Wpf

Package Description

DataFilter.Expressions.Server

Package Description

DataFilter.Blazor

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.4 273 6/9/2026
1.1.3 250 6/8/2026
1.1.2 248 6/8/2026
1.1.1 238 6/5/2026
1.1.0 262 6/4/2026
1.0.0-beta 145 3/10/2026