PortablePrism.Portable by Andrii Chebukin

<PackageReference Include="PortablePrism.Portable" Version="1.0.1" />

 UriParsingHelper

public static class UriParsingHelper
Helper class for parsing Uri instances.
using System; namespace Microsoft.Practices.Prism { public static class UriParsingHelper { public static string GetQuery(Uri uri) { return EnsureAbsolute(uri).Query; } public static string GetAbsolutePath(Uri uri) { return EnsureAbsolute(uri).AbsolutePath; } public static UriQuery ParseQuery(Uri uri) { string query = GetQuery(uri); return new UriQuery(query); } private static Uri EnsureAbsolute(Uri uri) { if (uri.IsAbsoluteUri) return uri; if (uri != (Uri)null && !uri.OriginalString.StartsWith("/", StringComparison.Ordinal)) return new Uri("http://localhost/" + uri, UriKind.Absolute); return new Uri("http://localhost" + uri, UriKind.Absolute); } } }