DataFilter.Core
1.1.0
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
<PackageReference Include="DataFilter.Core" Version="1.1.0" />
<PackageVersion Include="DataFilter.Core" Version="1.1.0" />
<PackageReference Include="DataFilter.Core" />
paket add DataFilter.Core --version 1.1.0
#r "nuget: DataFilter.Core, 1.1.0"
#:package DataFilter.Core@1.1.0
#addin nuget:?package=DataFilter.Core&version=1.1.0
#tool nuget:?package=DataFilter.Core&version=1.1.0
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
FilterExpressionBuilderfor standard LINQ filter generation. - Models: Standardized
FilterSnapshot,FilterPipelineSnapshot,SortDescriptor, andPagedResult. - 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 | Versions 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. |
-
.NETStandard 2.0
- System.Text.Json (>= 8.0.5)
-
.NETStandard 2.1
- System.Text.Json (>= 8.0.5)
-
net8.0
- System.Text.Json (>= 8.0.5)
-
net9.0
- System.Text.Json (>= 8.0.5)
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.