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 | |
![]() |
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. |
![]() |
AbsoluteUri | string | Gets the absolute URI as the entire URI address, including all fragments and query strings. |
![]() |
Authority | string | Gets the “authority component” of the URI. This is typically the DNS host name or the server IP address and port number. |
![]() |
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. |
![]() |
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. |
![]() |
IsAbsoluteUri | bool | True if the URI instance represents an absolute URI; false otherwise (relative URI). |
![]() |
IsDefaultPort | bool | True if the port value is the default port value for the scheme; false otherwise. |
![]() |
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”. |
![]() |
IsLoopBack | bool | True if the URI refers to the local host; false otherwise. |
![]() |
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. |
![]() |
OriginalString | string | Gets the string representation of the address with which the URI was originally constructed. |
![]() |
PathAndQuery | string | Gets the AbsolutePath and Query properties separated by a question mark (?). |
![]() |
Port | int | Gets the port number of the URI. |
![]() |
Query | string | Gets the query portion of the URI address. |
![]() |
Scheme | string | Gets the name of the scheme used in the URI. |
![]() |
UserInfo | string | Gets the user name, password, and other user-specific information associated with the URI. |
Methods
Name | Description | |
![]() |
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. |
![]() |
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. |
![]() |
Create() | Initializes a new instance of the class. |
![]() |
Create(address) | Initializes a new instance of the class using the address string parameter used to create the URI. |
![]() |
EscapeDataString(stringToEscape) | Convert the stringToEscape string to its “escaped” representation. |
![]() |
IsBaseOf( URIObject ) | True if the current URI is a base of the URI specified by the URIObject parameter; returns false otherwise. |
![]() |
IsWellFormedOriginalString() | True if the string used to create the URI is well-formed; returns false otherwise (for example, if the string requires further escaping). |
![]() |
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. |
![]() |
ToString() | A string representation of the URI object. |