Search Results for

    Show / Hide Table of Contents

    Class UriUtil

    Utility functions for Uris and Uri strings

    Inheritance
    System.Object
    UriUtil
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: ImageVault.Common.Lib.Web
    Assembly: ImageVault.Common.dll
    Syntax
    public static class UriUtil

    Methods

    FixRelativeApplicationUrlPath(String, String)

    Fixes the current url to be a real url (absolute or absolute relative, ie http://site.com/path or /path) input url can be http://site.com (absolute) /myPath (absolute relative) ~/myPath (application absolute relative) myPath (application absolute relative)

    Declaration
    public static string FixRelativeApplicationUrlPath(string url, string appDomainAppVirtualPath)
    Parameters
    Type Name Description
    System.String url
    System.String appDomainAppVirtualPath
    Returns
    Type Description
    System.String
    Remarks

    Will return a suitable url. If url is an absolute url, then use it. ~/ marks an app relative url / marks an absolute virtual path if a relative url, make it absolute. All returned urls will end with a /

    GetServiceUri(String, String)

    Gets the uri for the supplied service

    Declaration
    public static Uri GetServiceUri(string baseUri, string servicePath)
    Parameters
    Type Name Description
    System.String baseUri

    The base uri to the service (with or without trailing slash)

    System.String servicePath

    the relative path from the base uri

    Returns
    Type Description
    System.Uri

    IsSameSchemeHostAndPort(Uri, Uri)

    Compares two uri and returns true if they share the same scheme host and port

    Declaration
    public static bool IsSameSchemeHostAndPort(Uri a, Uri b)
    Parameters
    Type Name Description
    System.Uri a
    System.Uri b
    Returns
    Type Description
    System.Boolean

    ParseQuery(String)

    Parses the supplied url and returns a System.Collections.Specialized.NameValueCollection containing any query string parameters found

    Declaration
    public static NameValueCollection ParseQuery(string url)
    Parameters
    Type Name Description
    System.String url
    Returns
    Type Description
    System.Collections.Specialized.NameValueCollection

    ParseQuery(Uri)

    Parses the supplied uri and returns a System.Collections.Specialized.NameValueCollection containing any query string parameters found

    Declaration
    public static NameValueCollection ParseQuery(Uri uri)
    Parameters
    Type Name Description
    System.Uri uri
    Returns
    Type Description
    System.Collections.Specialized.NameValueCollection
    In This Article
    Back to top (c) Meriworks 2002-2022