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
Improved WebUtils.ParseQueryString() #15245
Improved WebUtils.ParseQueryString() #15245
Conversation
@@ -1,45 +1,50 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Diagnostics; | |||
using System.Linq; | |||
using System.Text; | |||
|
|||
namespace Microsoft.Maui.ApplicationModel | |||
{ | |||
static class WebUtils | |||
{ | |||
internal static IDictionary<string, string> ParseQueryString(string url) |
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.
Is there some standard System.Uri
parsing code we can call instead of writing our own?
It seems like there should be a BCL way to return a dictionary of key/value pairs.
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.
It does seem like there should be a class for this in the BCL but afaik, there isn't.
It is definitely not part of Uri.
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.
This is the new one:
Can we bring in the source for it and make it internal
?
https://source.dot.net/#Microsoft.AspNetCore.WebUtilities/QueryHelpers.cs,1c1b023fbf834a3d
836612c
to
34de1eb
Compare
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
8648d2f
to
67cba8b
Compare
67cba8b
to
f7cc37c
Compare
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
var span = query.AsSpan(valueIndex, index - valueIndex); | ||
var chars = new char[span.Length]; |
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.
I like how we got optimized Span<T>
code now for free!
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.
This looks OK to me now, assuming CI is green.
* Reduce memory allocations * Decode parameter values Fixes issue #9223
1cb675e
to
edeae34
Compare
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
@jonathanpeppers looks like the failure is due to an old version of Xcode. What do we do to progress on this? |
Someone on the MAUI team can check? Maybe @rmarinho? @mattleibow I think you should review, too -- this is something in Essentials. |
it's not related we can move this and ignore that failure. We are still looking on a fix. |
Description of Change
Issues Fixed
Fixes issue #9223