Add HandlerTemplate to ScanForTypesAttribute#58
Conversation
Agent-Logs-Url: https://github.com/Dreamescaper/ServiceScan.SourceGenerator/sessions/03f9fca7-2aac-495b-94d4-354852cc473b Co-authored-by: Dreamescaper <17177729+Dreamescaper@users.noreply.github.com>
… EndsWith check Agent-Logs-Url: https://github.com/Dreamescaper/ServiceScan.SourceGenerator/sessions/03f9fca7-2aac-495b-94d4-354852cc473b Co-authored-by: Dreamescaper <17177729+Dreamescaper@users.noreply.github.com>
|
@copilot |
Agent-Logs-Url: https://github.com/Dreamescaper/ServiceScan.SourceGenerator/sessions/45210ec8-80ca-48d7-9e03-aeaaf4255cf7 Co-authored-by: Dreamescaper <17177729+Dreamescaper@users.noreply.github.com>
|
@copilot |
…yond constructors Agent-Logs-Url: https://github.com/Dreamescaper/ServiceScan.SourceGenerator/sessions/fc89dc29-473c-48ba-9b29-64a15376f02e Co-authored-by: Dreamescaper <17177729+Dreamescaper@users.noreply.github.com>
Updated in 6af0890. The section is now titled "Use a template expression for each matched type" and leads with the general concept before showing three distinct examples: constructor args, a static factory method with multiple parameters, and |
…f example Agent-Logs-Url: https://github.com/Dreamescaper/ServiceScan.SourceGenerator/sessions/039c87db-f442-450d-94d7-fb871c81d9f8 Co-authored-by: Dreamescaper <17177729+Dreamescaper@users.noreply.github.com>
…method example Agent-Logs-Url: https://github.com/Dreamescaper/ServiceScan.SourceGenerator/sessions/f3293937-d4cf-4fcf-aa3c-c1c153bf5421 Co-authored-by: Dreamescaper <17177729+Dreamescaper@users.noreply.github.com>
ScanForTypesAttributelacked a way to generate per-type expressions beyond method invocations, forcing users to fall back toActivatorwhen constructors require arguments.Changes
HandlerTemplateproperty onScanForTypesAttribute: a string template whereT(word-boundary matched) is replaced with the fully-qualified name of each found typevoid/ first-param-returning methods: template becomes a statement (;appended if absent)Handler— newDI0016diagnostic enforces thisMissingCustomHandlerOnGenerateServiceHandler(DI0013) no longer fires whenHandlerTemplateis set\bT\bregex (static compiled) for safe word-boundary replacementUsage