Skip to content

Generate injectable resource providers by default - #67

Merged
rudyhuyn merged 4 commits into
mainfrom
user/ruhuynva/always-generate-resource-providers
Aug 22, 2026
Merged

Generate injectable resource providers by default#67
rudyhuyn merged 4 commits into
mainfrom
user/ruhuynva/always-generate-resource-providers

Conversation

@rudyhuyn

@rudyhuyn rudyhuyn commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • generate an I<Resource> interface and sealed <Resource>Provider adapter by default
  • keep the existing <Resource> class static so package upgrades do not alter its API shape
  • allow projects to disable the additional types with <ReswPlusGenerateResourceInterfaces>false</ReswPlusGenerateResourceInterfaces>
  • make generation and reserved-name diagnostics honor the option consistently
  • extend generated-code hygiene checks to cover public interface members

Validation

  • dotnet test tests\ReswPlusUnitTests\ReswPlusUnitTests.csproj --no-restore (1,400 passed)

Rudy Huyn and others added 4 commits August 21, 2026 22:33
- Keep generated resource classes static and preserve their API shape
- Always emit injectable interfaces and sealed provider adapters
- Remove the obsolete opt-in property and cover provider collisions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Default ReswPlusGenerateResourceInterfaces to true
- Suppress interfaces, providers, and related collision diagnostics when false
- Verify reserved adapter names remain usable when generation is disabled

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Describe per-resource generated type names
- Show constructor injection and container registration
- Clarify explicit implementation and opt-out behavior

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add a dedicated guide for generated types, DI registration, compatibility, and opt-out behavior
- Keep the README section as a concise link to the guide

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rudyhuyn
rudyhuyn marked this pull request as ready for review August 22, 2026 06:27
@rudyhuyn
rudyhuyn merged commit ea4ef9f into main Aug 22, 2026
5 checks passed
@rudyhuyn
rudyhuyn deleted the user/ruhuynva/always-generate-resource-providers branch August 22, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant