Facet.Search.Generators 0.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package Facet.Search.Generators --version 0.0.3
                    
NuGet\Install-Package Facet.Search.Generators -Version 0.0.3
                    
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="Facet.Search.Generators" Version="0.0.3">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Facet.Search.Generators" Version="0.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Facet.Search.Generators">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 Facet.Search.Generators --version 0.0.3
                    
#r "nuget: Facet.Search.Generators, 0.0.3"
                    
#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 Facet.Search.Generators@0.0.3
                    
#: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=Facet.Search.Generators&version=0.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Facet.Search.Generators&version=0.0.3
                    
Install as a Cake Tool

Facet.Search.Generators

NuGet License

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

  1. The generator scans your compilation for classes marked with [FacetedSearch]
  2. It analyzes properties with [SearchFacet], [FullTextSearch], and [Searchable] attributes
  3. At compile time, it emits .g.cs files 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

License

MIT License - see LICENSE for details.

There are no supported framework assets in this package.

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.

Version Downloads Last Updated
0.1.5 178 12/24/2025
0.1.1 270 12/15/2025
0.1.0 246 12/15/2025
0.0.4 425 12/11/2025
0.0.3 411 12/11/2025
0.0.1 416 12/11/2025