Facet.Search.Generators
0.0.1
See the version list below for details.
dotnet add package Facet.Search.Generators --version 0.0.1
NuGet\Install-Package Facet.Search.Generators -Version 0.0.1
<PackageReference Include="Facet.Search.Generators" Version="0.0.1"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Facet.Search.Generators" Version="0.0.1" />
<PackageReference Include="Facet.Search.Generators"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Facet.Search.Generators --version 0.0.1
#r "nuget: Facet.Search.Generators, 0.0.1"
#:package Facet.Search.Generators@0.0.1
#addin nuget:?package=Facet.Search.Generators&version=0.0.1
#tool nuget:?package=Facet.Search.Generators&version=0.0.1
Facet.Search.Generators
Source generators for Facet.Search - Automatically generates faceted search infrastructure from your domain models at compile time.
?? Note: This package is included automatically when you install
Facet.Search. You only need to install this package directly if you want to use the generators without the main package.
What Gets Generated
When you decorate your models with [FacetedSearch] and [SearchFacet] attributes, this generator creates:
| Generated Class | Description |
|---|---|
{Model}SearchFilter |
Strongly-typed filter class with properties for each facet |
{Model}SearchExtensions |
LINQ extension methods (ApplyFacetedSearch, etc.) |
{Model}FacetResults |
Aggregation results class for facet counts and ranges |
{Model}SearchMetadata |
Static metadata for building dynamic UIs |
How It Works
- The generator scans your compilation for classes marked with
[FacetedSearch] - It analyzes properties with
[SearchFacet],[FullTextSearch], and[Searchable]attributes - At compile time, it emits
.g.csfiles with all the search infrastructure
Generated Code Location
Generated files appear in your project's obj folder:
obj/Debug/net8.0/generated/Facet.Search.Generators/
??? ProductSearchFilter.g.cs
??? ProductSearchExtensions.g.cs
??? ProductFacetAggregations.g.cs
??? ProductSearchMetadata.g.cs
Requirements
- .NET Standard 2.0+
- C# 9.0+
Installation
Typically, you should install the main package which bundles this generator:
dotnet add package Facet.Search
For standalone generator installation:
dotnet add package Facet.Search.Generators
Related Packages
- Facet.Search - Main package with attributes (includes this generator)
- Facet.Search.EFCore - Entity Framework Core async extensions
License
MIT License - see LICENSE for details.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.