xtd::uri::uri | ( | const xtd::string & | uri, |
xtd::uri_kind | uri_kind | ||
) |
Initializes a new instance of the xtd::uri class with the specified URI. This constructor allows you to specify if the URI string is a relative URI, absolute URI, or is indeterminate.
uri_string | : A string that identifies the resource to be represented by the xtd::uri instance. Note that an IPv6 address in string form must be enclosed within brackets. For example, "http://[2607:f8b0:400d:c06::69]". |
uri_kind | : Specifies whether the URI string is a relative URI, absolute URI, or is indeterminate. |
xtd::uri_format_exception | uri_string contains a relative URI and uri_kind is xtd::uri_kind::absolute. -or- uri_string contains an absolute URI and uri_kind is xtd::uri_kind::relative. -or- uri_string is empty. -or- The scheme specified in uri_string is not correctly formed. See CheckSchemeName(String). -or- uri_string contains too many slashes. -or- The password specified in uri_string is not valid. -or- The host name specified in uri_string is not valid. -or- The file name specified in uri_string is not valid. -or- The user name specified in uri_string is not valid. -or- The host or authority name specified in uri_string cannot be terminated by backslashes. -or- The port number specified in uri_string is not valid or cannot be parsed. -or- The length of uri_string exceeds 65519 characters. -or- The length of the scheme specified in uri_string exceeds 1023 characters. -or- There is an invalid character sequence in uri_string. -or- The MS-DOS path specified in uri_string must start with c:\. |