Source generators for Blazor AutoComplete providing AOT/trimming compatibility via build-time property accessor generation and expression validation (EBDAC001-003 diagnostics). Development dependency with zero runtime overhead.
$ dotnet add package EasyAppDev.Blazor.AutoComplete.GeneratorsSource generators for the Blazor AutoComplete component. Enables AOT compilation and trimming compatibility.
This package is automatically installed when you add the core AutoComplete package:
dotnet add package EasyAppDev.Blazor.AutoComplete
Generates compiled property accessors at build time, eliminating the need for Expression.Compile() at runtime.
// Your code
<AutoComplete TextField="@(p => p.Name)" />
// Generated at build time
public static string GetName(Product p) => p.Name;
Enforces trimming-safe expression patterns with compile-time diagnostics.
// Valid: Simple property access
<AutoComplete TextField="@(p => p.Name)" />
// Invalid: Method call - triggers EBDAC001
<AutoComplete TextField="@(p => p.Name.ToUpper())" />
// Invalid: String interpolation - triggers EBDAC001
<AutoComplete TextField="@(p => $"{p.Name}")" />
Auto-generates the configuration application method with 100% parameter coverage.
| Code | Description |
|---|---|
| EBDAC001 | Invalid TextField Expression (must be simple property access) |
| EBDAC002 | Invalid ValueField Expression |
| EBDAC003 | Unsupported Expression Type (trimming incompatible) |
dotnet publish -c Release /p:PublishAot=true
To view generated code:
obj/Debug/net8.0/generated/
obj/Debug/net9.0/generated/
netstandard2.0 (Roslyn analyzer requirement)MIT