Skip to content

Conversation

@jtorreguitar
Copy link
Contributor

@jtorreguitar jtorreguitar commented Jan 21, 2019

Summary:

Adding a parameter to a uri using the existing URI class is verbose and long-winded. A new class was added that provides and extension method for adding these parameters in a simple way. Note that it will throw an exception if used with relative uris as it uses the URIBuilder class which does not support this type of uri.

Sample usage:

URI uri = new URI(Client.BaseAddress + ControllerBaseURL)
            .AddParameter("categoryId", "0")
            .AddParameter("ageRangeId", "0")
            .AddParameter("pageSize", $"{count}");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants