Exemplo n.º 1
0
		/// <summary>
		/// Will purify the <param name="uri"></param> to the unscrubed version.
		/// <pre>Calling this will be a NOOP on .NET 4.5 and up.</pre>
		/// </summary>
		/// <param name="uri">The uri to be purified</param>
		/// <returns>The purified uri</returns>
		public static Uri Purify(this Uri uri)
		{
			IPurifier purifier = null;
			if (IsMono)
				purifier = new PurifierMono();
			else if (HasBrokenDotNetUri)
				purifier = new PurifierDotNet();
			else return uri;

			return purifier.Purify(uri);
		}
Exemplo n.º 2
0
        /// <summary>
        /// Will purify the <param name="uri"></param> to the unscrubed version.
        /// <pre>Calling this will be a NOOP on .NET 4.5 and up.</pre>
        /// </summary>
        /// <param name="uri">The uri to be purified</param>
        /// <returns>The purified uri</returns>
        public static Uri Purify(this Uri uri)
        {
            IPurifier purifier = null;

            if (IsMono)
            {
                purifier = new PurifierMono();
            }
            else if (HasBrokenDotNetUri)
            {
                purifier = new PurifierDotNet();
            }
            else
            {
                return(uri);
            }

            return(purifier.Purify(uri));
        }
Exemplo n.º 3
0
        public static void Purify(this Uri uri)
        {
            IPurifier purifier = null;

            if (isMono)
            {
                purifier = new PurifierMono();
            }
            else if (hasBrokenDotNetUri)
            {
                purifier = new PurifierDotNet();
            }
            else
            {
                return;
            }

            purifier.Purify(uri);
        }