Skip to content

feat: add netstandard2.0 target and flattening cache#3

Open
bmgbeokwere wants to merge 1 commit intopanoramicdata:mainfrom
bmgbeokwere:feat/netstandard2-target
Open

feat: add netstandard2.0 target and flattening cache#3
bmgbeokwere wants to merge 1 commit intopanoramicdata:mainfrom
bmgbeokwere:feat/netstandard2-target

Conversation

@bmgbeokwere
Copy link

feat: add netstandard2.0 target and flattening cache

Add netstandard2.0 as a second target framework alongside net10.0, making the library consumable from older runtimes. Fixes all API incompatibilities introduced by the broader language and runtime surface of net10.0, and adds a memoisation cache for flattened property accessor resolution.

  • Add IsExternalInit polyfill to support record struct on netstandard2.0
  • Replace ArgumentNullException.ThrowIfNull (.NET 6+) with explicit null guards
  • Replace index/range syntax (^, ..) with Length-1 and Substring() calls
  • Replace Dictionary.TryAdd with ContainsKey + Add for netstandard2.0
  • Use #if NET5_0_OR_GREATER to select the correct GetMethod overload per target
  • Fix erroneous static modifier on MapWithDepthTracking
  • Cache TryBuildFlattenedGetter results keyed on (destPropertyName, sourceType) to eliminate redundant reflection on repeated configuration or validation calls
  • Add three new flattening cache tests covering hit, key collision, and null miss
  • Mark all private Profile subclasses in tests as sealed

@codacy-production
Copy link

codacy-production bot commented Mar 19, 2026

Codacy's Analysis Summary

0 new issue (≤ 0 issue)
0 new security issue
19 complexity
0 duplications
More details

AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes. Give us feedback

Add netstandard2.0 as a second target framework alongside net10.0, making
the library consumable from older runtimes. Fixes all API incompatibilities
introduced by the broader language and runtime surface of net10.0, and adds
a memoisation cache for flattened property accessor resolution.

- Add IsExternalInit polyfill to support record struct on netstandard2.0
- Replace ArgumentNullException.ThrowIfNull (.NET 6+) with explicit null guards
- Replace index/range syntax (^, ..) with Length-1 and Substring() calls
- Replace Dictionary.TryAdd with ContainsKey + Add for netstandard2.0
- Use #if NET5_0_OR_GREATER to select the correct GetMethod overload per target
- Fix erroneous static modifier on MapWithDepthTracking
- Cache TryBuildFlattenedGetter results keyed on (destPropertyName, sourceType)
  to eliminate redundant reflection on repeated configuration or validation calls
- Add three new flattening cache tests covering hit, key collision, and null miss
- Mark all private Profile subclasses in tests as sealed
@bmgbeokwere bmgbeokwere force-pushed the feat/netstandard2-target branch from 4efe1f3 to f64fb46 Compare March 19, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant