Uri Class

This class provides the means to create an object representation of a uniform resource identifier (URI).

Namespace: elsystem 

Properties

   Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).

  Name Type Description
Public property AbsolutePath string Gets the absolute path represented by the URI. Typically, this is the path without the scheme, host name, or query portion of the URI.
Public property AbsoluteUri string Gets the absolute URI as the entire URI address, including all fragments and query strings.
Public property Authority string Gets the “authority component” of the URI. This is typically the DNS host name or the server IP address and port number.
Public property Fragment string Gets the escaped portion of the current URI. The fragment is any text following the fragment marker (#). The Fragment includes the fragment marker.
Public property Host string Gets the host name. This is usually the DNS host name or IP address of the host server. Does not include the port number.
Public property IsAbsoluteUri bool True if the URI instance represents an absolute URI; false otherwise (relative URI).
Public property IsDefaultPort bool True if the port value is the default port value for the scheme; false otherwise.
Public property IsFile bool Gets a Boolean value indicating that the URI is a “file URI” (true) or not (false). Commonly, file URI addresses will contain the word “file”.
Public property IsLoopBack bool True if the URI refers to the local host; false otherwise.
Public property LocalPath string Gets the unescaped string representation of the local path to a file if the file is hosted locally; gets an empty string if the address does not point to a local host.
Public property OriginalString string Gets the string representation of the address with which the URI was originally constructed.
Public property PathAndQuery string Gets the AbsolutePath and Query properties separated by a question mark (?).
Public property Port int Gets the port number of the URI.
Public property Query string Gets the query portion of the URI address.
Public property Scheme string Gets the name of the scheme used in the URI.
Public property UserInfo string Gets the user name, password, and other user-specific information associated with the URI.
Methods
  Name Description
Public property CheckHostName(name) Gets an enumerated value indicating the UriHostNameType associated with the host specified in the name parameter. The host name can be an IPv4 address, an IPv6 address or an internet host name. If Name is not a valid DNS name, or if the type of host cannot be determined, then HostNameType.Unknown will be returned. If any value other than HostNameType.Unknown is returned then the host name is valid.
Public property CheckSchemeName(name) True if the scheme name provided in the Name parameter is valid according to RFC 2396 (the standard which specifies the syntax of a URI); false otherwise.
Public property Create() Initializes a new instance of the class.
Public property Create(address) Initializes a new instance of the class using the address string parameter used to create the URI.
Public property EscapeDataString(stringToEscape) Convert the stringToEscape string to its “escaped” representation.
Public property IsBaseOf( URIObject ) True if the current URI is a base of the URI specified by the URIObject parameter; returns false otherwise.
Public property IsWellFormedOriginalString() True if the string used to create the URI is well-formed; returns false otherwise (for example, if the string requires further escaping).
Public property IsWellFormedUriString(adresss,kind) True if the string passed as address is well-formed and can be used without further escaping to form a URI of the type kind; false otherwise (for example, if the string requires further escaping). See URIKind.
Public property ToString() A string representation of the URI object.