Skip to content
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 generic WithConversion method #1631

Merged
merged 2 commits into from Feb 26, 2017
Merged

Conversation

mvanbeusekom
Copy link
Contributor

This change will add a generic "WithConversion" method. This will allow developers to strongly type the use of value converters, making refactoring a lot easier and more save. For example:

set.Bind(textField).To(vm => vm.Counter).WithConversion<SomeValueConverter>();

Note: I have made the FindName method public (from protected) and added it to the IMvxValueConverterRegistryFiller interface. This allows me to reuse the same code to determine the name of the value converter based on the type.

@Cheesebaron
Copy link
Member

Great stuff Maurits!

Copy link
Member

@Cheesebaron Cheesebaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@Cheesebaron Cheesebaron merged commit 11a49a6 into MvvmCross:develop Feb 26, 2017
@martijn00 martijn00 added this to the 5.0.0 milestone Apr 25, 2017
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.

None yet

3 participants