Skip to content

NexusLabs.Needlr.Generators

NexusLabs.Needlr.Generators

NexusLabs.Needlr.Generators Namespace

Classes
GenerateFactoryAttributeAnalyzer Analyzer that validates [GenerateFactory] and [GenerateFactory\<T>] attribute usage: - NDLRGEN003: All constructor parameters are injectable (factory unnecessary) - NDLRGEN004: No constructor parameters are injectable (low value factory) - NDLRGEN005: Type argument T is not an interface implemented by the class
HttpClientOptionsAnalyzer Analyzer for [HttpClientOptions] usage. Enforces the contracts the generator relies on and reports six diagnostics: ...
OpenDecoratorForAttributeAnalyzer Analyzer that validates [OpenDecoratorFor] attribute usage: - NDLRGEN006: Type argument must be an open generic interface - NDLRGEN007: Decorator class must be an open generic with matching arity - NDLRGEN008: Decorator class must implement the open generic interface
OptionsAttributeAnalyzer Analyzer that validates [Options] attribute usage for validation configuration: - NDLRGEN014: Validator type has no validation method - NDLRGEN015: Validator type mismatch - NDLRGEN016: Validation method not found - NDLRGEN017: Validation method has wrong signature - NDLRGEN018: Validator won't run (ValidateOnStart = false) - NDLRGEN019: ValidateMethod won't run (ValidateOnStart = false)
ProviderAttributeAnalyzer Analyzer that validates [Provider] attribute usage: - NDLRGEN031: [Provider] on class requires `partial` modifier - NDLRGEN032: [Provider] interface must only contain get-only properties - NDLRGEN033: Provider property type is a concrete class - NDLRGEN034: Circular provider dependency detected
TypeRegistryGenerator Incremental source generator that produces a compile-time type registry for dependency injection, eliminating runtime reflection.
UnsupportedDataAnnotationAnalyzer Analyzer that warns when [Options] classes use DataAnnotation validation attributes that cannot be source-generated. NDLRGEN030: DataAnnotation attribute cannot be source-generated