-
-
Notifications
You must be signed in to change notification settings - Fork 201
Add support for From and To method conversions (#1117)
#1616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for From and To method conversions (#1117)
#1616
Conversation
22527b1 to
2d82323
Compare
latonz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR! I’m excited to see this feature added to Mapperly. I’ve shared my feedback 😊
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertInstanceMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertInstanceMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
Fixes for code review
…_factory_methods' into #1117_Support_From_and_To_static_factory_methods # Conflicts: # docs/docs/configuration/conversions.md # src/Riok.Mapperly.Abstractions/MappingConversionType.cs # src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertInstanceMethodMappingBuilder.cs # src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs # src/Riok.Mapperly/Descriptors/Mappings/ToStringMapping.cs # test/Riok.Mapperly.Abstractions.Tests/_snapshots/PublicApiTest.PublicApiHasNotChanged.verified.cs # test/Riok.Mapperly.Tests/Mapping/StaticMethodConversionTest.cs
latonz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates! I added my feedback 😊
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertInstanceMethodMappingBuilder.cs
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
src/Riok.Mapperly/Descriptors/MappingBuilders/ConvertStaticMethodMappingBuilder.cs
Outdated
Show resolved
Hide resolved
6cce5d5 to
e0ac3e4
Compare
e0ac3e4 to
2016b07
Compare
|
Thank you for this contribution! |
Add support for
FromandTomethod conversions (#1117)Description
Despite the discussion in the issue, the ToString mapping builder remains untouched as it contains a lot of logic.
Instead, the new mapping builder eliminates the mapping to
string.The previously existing mapping builders for
DateTimemapping have been removed, as their role is now performed by the new mapping builder for static methods.However,
MappingConversionTypehas only been extended, the previously existingMappingConversionType.DateTimeToDateOnlyandMappingConversionType.DateTimeToTimeOnlyare left for backward compatibility, their processing has been moved to the new mapping builderFixes #1117
Checklist