Skip to content

Add DateOnly/TimeOnly and ctor mapping fixes - #7

Merged
manusoft merged 1 commit into
masterfrom
fix/major-two-fixes
Sep 25, 2026
Merged

manusoft merged 1 commit into
masterfrom
fix/major-two-fixes

Conversation

@manusoft

Copy link
Copy Markdown
Owner

Bump package to 4.0.1 and release notes/CHANGELOG update. Add ConstructorPlan to robustly select and invoke constructors (including non-public), honor optional/default params, match params case-insensitively, and throw detailed MappingException for null/non-nullable or invocation errors. MappingPlan now excludes constructor-bound members.

Add DateOnly/TimeOnly as simple types and extend conversion support for enum↔string, string→enum, and enum↔primitive conversions. Improve MappingEngine null handling (nullable vs non-nullable destinations), preserve-reference usage, and require complex/nested objects to be mapped via plans to avoid reusing source instances. Simplify collection/generic element detection and improve TryConvert (uses Convert.ChangeType fallback for enums).

Improve MappingPlan destination instantiation (handle value types via Activator.CreateInstance and surface instantiation errors), use MappingEngine.IsNullableType for null decisions, and refine MappingException messages/formatting.

Add regression/unit tests (ObjectMapperTest and supporting test types) covering nullable DateOnly/TimeOnly, enum→string constructor mapping, and other scenarios. Patch release with tests and bug fixes.

Bump package to 4.0.1 and release notes/CHANGELOG update. Add ConstructorPlan to robustly select and invoke constructors (including non-public), honor optional/default params, match params case-insensitively, and throw detailed MappingException for null/non-nullable or invocation errors. MappingPlan now excludes constructor-bound members.

Add DateOnly/TimeOnly as simple types and extend conversion support for enum↔string, string→enum, and enum↔primitive conversions. Improve MappingEngine null handling (nullable vs non-nullable destinations), preserve-reference usage, and require complex/nested objects to be mapped via plans to avoid reusing source instances. Simplify collection/generic element detection and improve TryConvert (uses Convert.ChangeType fallback for enums).

Improve MappingPlan destination instantiation (handle value types via Activator.CreateInstance and surface instantiation errors), use MappingEngine.IsNullableType for null decisions, and refine MappingException messages/formatting.

Add regression/unit tests (ObjectMapperTest and supporting test types) covering nullable DateOnly/TimeOnly, enum→string constructor mapping, and other scenarios. Patch release with tests and bug fixes.
@manusoft manusoft added this to the v4.0.1 milestone Sep 25, 2026
@manusoft manusoft self-assigned this Sep 25, 2026
@manusoft manusoft added the documentation Improvements or additions to documentation label Sep 25, 2026
@manusoft
manusoft merged commit 3b3c2aa into master Sep 25, 2026
3 checks passed
@manusoft
manusoft deleted the fix/major-two-fixes branch September 25, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant