Parsing out query parameters from Live Tile as NameValueCollection while in background agent

I'm parsing out the query parameters as a NameValueCollection from an uri based on a ShellTile.NavigationUri property. While in the context of a background agent I don't have access to the NavigationContext as described here: Parse URI Arguments on ShellTile on Windows Phone 7.

Is there any api available similar to System.Web.HttpUtility.ParseQueryString for Windows Phone? This is easily achieved by string operations, but I'm just curious to know any alternatives.

Upvotes: 2

Views: 943

Answers (1)

Matt Lacey
Matt Lacey

Reputation: 65586

As you can get the Uri from the tile, you can still split the Query by "&" and then split each element that returns by "=" to create the NameValueCollection yourself.

Upvotes: 2

Related Questions