-
Notifications
You must be signed in to change notification settings - Fork 352
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 matchesPattern support #2519
Conversation
test/EndToEndTests/Tests/Client/Build.Desktop/LegacyReferences/TrippinServiceReference.cs
Outdated
Show resolved
Hide resolved
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.
Fix broken test case
Fix misaligned spacing
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
Issues
This pull request fixes #1901.
Description
Adds support for the
matchesPattern
function introduced in OData v4. In addition to being added as a supported function to the raw parser, it is mapped in .NET toRegex.IsMatch(input, pattern, RegexOptions.ECMAScript)
.The basic methodology was to look for any C# file in the repository that handled all of the string predicates (
startswith
,endswith
, etc.) and addedmatchesPattern
to that set. There was at least one legacy provider with no support for e.g.contains
; that provider was unmodified.As part of this work, the case-insensitivity logic had to be changed to account for
matchesPattern
being the first OData function whose canonical name is mixed-case.Checklist
Unable to cast COM object of type 'AstoriaUnitTests.Tests.JScriptEngine'...
)