dotnet-source-gen-options-validation
CommunityCompile-time, reflection-free options validation.
AuthorIm5tu
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Convert data-annotation based validation in options classes into a compile-time source-generated validator to remove runtime reflection and enable native AOT environments.
Core Features & Use Cases
- Compile-time validation: Generates IValidateOptions implementations at build time.
- AOT-friendly: Eliminates reflection-based checks for Native AOT scenarios.
- Migration guidance: Simple path to migrate existing ValidateDataAnnotations calls.
Quick Start
Install Microsoft.Extensions.Options and ensure your options classes are in a project targeting .NET 8+. Create a partial validator for each options class, register it in DI, and build to verify.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: dotnet-source-gen-options-validation Download link: https://github.com/Im5tu/claude/archive/main.zip#dotnet-source-gen-options-validation Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.