Remove SimpleRecordProvider base class; use composition - #2
Merged
Merged
Conversation
`SimpleRecordProvider<TRecord>` was an invented abstract base class with no analog in the Apex original - it existed only to save the IRecordProvider delegation boilerplate for Providers that are nothing but a MasterTemplate. Deleted it. Every Provider that extended it now implements IRecordProvider directly: a private `_template` MasterTemplate, PrimaryTargetField and MasterTemplate returning it, and CreateBundle delegating to RecordFactory.CreateBundle - the same shape the bundled ContactDataProvider and AccountDataProvider already used. The Provider layer now has no inheritance. Converted 17 Providers across Xfty.Test and the Bogus / VectorDatabases* / EntityFrameworkCore test projects. Updated README, CHANGELOG (Unreleased -> Removed), and porting-history.md. Build clean; full suite green; verify-doc-examples/links pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RRxXJ1UpTuJLLH8dC1oALJ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SimpleRecordProvider<TRecord>was an invented abstract base class with no analog in the Apex original - it existed only to save the IRecordProvider delegation boilerplate for Providers that are nothing but a MasterTemplate.Deleted it. Every Provider that extended it now implements IRecordProvider directly: a private
_templateMasterTemplate, PrimaryTargetField and MasterTemplate returning it, and CreateBundle delegating to RecordFactory.CreateBundle - the same shape the bundled ContactDataProvider and AccountDataProvider already used. The Provider layer now has no inheritance.Converted 17 Providers across Xfty.Test and the Bogus / VectorDatabases* / EntityFrameworkCore test projects. Updated README, CHANGELOG (Unreleased -> Removed), and porting-history.md.
Build clean; full suite green; verify-doc-examples/links pass.
Claude-Session: https://claude.ai/code/session_01RRxXJ1UpTuJLLH8dC1oALJ