-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 FuncValueConverter with parameter support #15323
Add FuncValueConverter with parameter support #15323
Conversation
You can test this PR using the following package version. |
@@ -42,4 +42,44 @@ public FuncValueConverter(Func<TIn?, TOut> convert) | |||
throw new NotImplementedException(); | |||
} | |||
} | |||
|
|||
/// <summary> | |||
/// A general purpose <see cref="IValueConverter"/> that uses a <see cref="Func{TIn, TParam, TResult}"/> |
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.
TResult
should be TOut
both here and above.
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.
Fixed 10774a0
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.
Line 8 should be changed too.
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.
Oh missed that one e53f27b
You can test this PR using the following package version. |
You can test this PR using the following package version. |
* Add FuncValueConverter with parameter support * Fix summary comment * Fix summary comment * Add Equal and NotEqual converters to a ObjectConverters class * Fix condition for Equal * Added ObjectConverters unit tests
What does the pull request do?
Adds support for converter parameter into
FuncValueConverter<TIn, TParam, TOut>
and uses it to implementObjectConverters.Equal
andObjectConverters.NotEqual
convertersWhat is the current behavior?
No support for converter parameter in FuncValueConverter
What is the updated/expected behavior with this PR?
FuncValueConverter can be declared with parameter support in Func
How was the solution implemented (if it's not obvious)?
Created new version of generic
FuncValueConverter<TIn, TParam, TOut>
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues