Conversation
Use extension methods to remove duplication. Once a user comparer is specfied other modifiers are invalid. Once constraint modifiers are specified one no longer can use a user comparer. .IgnoreCase.Using() or .Using().IgnoreCase makes no IgnoreCase as the user comparer has no access to the IgnoreCase
|
Thanks @manfred-brands I'm not suggesting we account for that here already, but it did occur to me that the type-specialized equalconstraints added here could also make future features of that nature easier too. |
46fd3e9 to
2f99d81
Compare
It sometimes seems you know all outstanding issues, or have a good search method.
I added a commit to fix #2492 I also worked on adding an overload to specify StringComparison but that became to big and not sure if it adds anything. |
|
Thanks @manfred-brands ! I hope to have time to review within a few days |
This to prevent the ambiguity that the Comparer matches 4 different overloads.
2f99d81 to
879c489
Compare
OsirisTerje
left a comment
There was a problem hiding this comment.
Awesome work! But it is quite a lot. I'll pull it down and try it out on some projects, that is probably the easiest way to check it out.
|
Anything else you want to do here, @manfred-brands ? Or can we merge? |
Are you happy to merge to |
|
@OsirisTerje I have no access to a PC this week to resolve any possible conflicts. Feel free to merge otherwise I'll do it next week. |
|
@manfred-brands I see no merge conflicts here at the moment. I'm happy to merge this in now for you so that it can land before other PRs, eliminating the chance of future merge conflicts. Thanks again for your contribution here to make these APIs faster and more usable. |
Fixes #4874
Fixes #4875
Fixes #4877
Fixes #2492
This is a merge of #4847, #4848, #4853 with one additional commit restricting combining
Usingwith other modifiers.Once
Usingis selected, a user supplied comparer will be called which does not have access to anyWithinorIgnoreCasemodifiers.The classes are now such that once a constraint specific modifiers is selected, the return type will not have the
Usingmodifiers.The reverse also holds, once the
Usingmodifiers is used, the return type has no other modifiers.