Provides a custom constructor for uniform resource identifiers (URIs) and modifies URIs for the T:System.Uri class.
More...
|
| UriBuilder () |
| Initializes a new instance of the T:System.UriBuilder class. More...
|
|
| UriBuilder (string uri) |
| Initializes a new instance of the T:System.UriBuilder class with the specified URI. More...
|
|
| UriBuilder (Uri uri) |
| Initializes a new instance of the T:System.UriBuilder class with the specified T:System.Uri instance. More...
|
|
| UriBuilder (string schemeName, string hostName) |
| Initializes a new instance of the T:System.UriBuilder class with the specified scheme and host. More...
|
|
| UriBuilder (string scheme, string host, int portNumber) |
| Initializes a new instance of the T:System.UriBuilder class with the specified scheme, host, and port. More...
|
|
| UriBuilder (string scheme, string host, int port, string pathValue) |
| Initializes a new instance of the T:System.UriBuilder class with the specified scheme, host, port number, and path. More...
|
|
| UriBuilder (string scheme, string host, int port, string path, string extraValue) |
| Initializes a new instance of the T:System.UriBuilder class with the specified scheme, host, port number, path and query string or fragment identifier. More...
|
|
override bool | Equals (object rparam) |
| Compares an existing T:System.Uri instance with the contents of the T:System.UriBuilder for equality. More...
|
|
override int | GetHashCode () |
| Returns the hash code for the URI. More...
|
|
override string | ToString () |
| Returns the display string for the specified T:System.UriBuilder instance. More...
|
|
|
string | Fragment [get, set] |
| Gets or sets the fragment portion of the URI. More...
|
|
string | Host [get, set] |
| Gets or sets the Domain Name System (DNS) host name or IP address of a server. More...
|
|
string | Password [get, set] |
| Gets or sets the password associated with the user that accesses the URI. More...
|
|
string | Path [get, set] |
| Gets or sets the path to the resource referenced by the URI. More...
|
|
int | Port [get, set] |
| Gets or sets the port number of the URI. More...
|
|
string? | Query [get, set] |
| Gets or sets any query information included in the URI. More...
|
|
string | Scheme [get, set] |
| Gets or sets the scheme name of the URI. More...
|
|
Uri | Uri [get] |
| Gets the T:System.Uri instance constructed by the specified T:System.UriBuilder instance. More...
|
|
string | UserName [get, set] |
| The user name associated with the user that accesses the URI. More...
|
|
Provides a custom constructor for uniform resource identifiers (URIs) and modifies URIs for the T:System.Uri class.
Definition at line 9 of file UriBuilder.cs.
◆ UriBuilder() [1/7]
System.UriBuilder.UriBuilder |
( |
| ) |
|
Initializes a new instance of the T:System.UriBuilder class.
Definition at line 296 of file UriBuilder.cs.
◆ UriBuilder() [2/7]
System.UriBuilder.UriBuilder |
( |
string |
uri | ) |
|
Initializes a new instance of the T:System.UriBuilder class with the specified URI.
- Parameters
-
- Exceptions
-
T:System.ArgumentNullException | uri is null . |
T:System.UriFormatException | In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.FormatException, instead. uri is a zero length string or contains only spaces.-or- The parsing routine detected a scheme in an invalid form.-or- The parser detected more than two consecutive slashes in a URI that does not use the "file" scheme.-or- uri is not a valid URI. |
Definition at line 309 of file UriBuilder.cs.
◆ UriBuilder() [3/7]
System.UriBuilder.UriBuilder |
( |
Uri |
uri | ) |
|
Initializes a new instance of the T:System.UriBuilder class with the specified T:System.Uri instance.
- Parameters
-
uri | An instance of the T:System.Uri class. |
- Exceptions
-
T:System.ArgumentNullException | uri is null . |
Definition at line 326 of file UriBuilder.cs.
◆ UriBuilder() [4/7]
System.UriBuilder.UriBuilder |
( |
string |
schemeName, |
|
|
string |
hostName |
|
) |
| |
Initializes a new instance of the T:System.UriBuilder class with the specified scheme and host.
- Parameters
-
schemeName | An Internet access protocol. |
hostName | A DNS-style domain name or IP address. |
Definition at line 365 of file UriBuilder.cs.
◆ UriBuilder() [5/7]
System.UriBuilder.UriBuilder |
( |
string |
scheme, |
|
|
string |
host, |
|
|
int |
portNumber |
|
) |
| |
Initializes a new instance of the T:System.UriBuilder class with the specified scheme, host, and port.
- Parameters
-
scheme | An Internet access protocol. |
host | A DNS-style domain name or IP address. |
portNumber | An IP port number for the service. |
- Exceptions
-
T:System.ArgumentOutOfRangeException | portNumber is less than -1 or greater than 65,535. |
Definition at line 378 of file UriBuilder.cs.
◆ UriBuilder() [6/7]
System.UriBuilder.UriBuilder |
( |
string |
scheme, |
|
|
string |
host, |
|
|
int |
port, |
|
|
string |
pathValue |
|
) |
| |
Initializes a new instance of the T:System.UriBuilder class with the specified scheme, host, port number, and path.
- Parameters
-
scheme | An Internet access protocol. |
host | A DNS-style domain name or IP address. |
port | An IP port number for the service. |
pathValue | The path to the Internet resource. |
- Exceptions
-
T:System.ArgumentOutOfRangeException | port is less than -1 or greater than 65,535. |
Definition at line 392 of file UriBuilder.cs.
◆ UriBuilder() [7/7]
System.UriBuilder.UriBuilder |
( |
string |
scheme, |
|
|
string |
host, |
|
|
int |
port, |
|
|
string |
path, |
|
|
string |
extraValue |
|
) |
| |
Initializes a new instance of the T:System.UriBuilder class with the specified scheme, host, port number, path and query string or fragment identifier.
- Parameters
-
scheme | An Internet access protocol. |
host | A DNS-style domain name or IP address. |
port | An IP port number for the service. |
path | The path to the Internet resource. |
extraValue | A query string or fragment identifier. |
- Exceptions
-
T:System.ArgumentException | extraValue is neither null nor F:System.String.Empty, nor does a valid fragment identifier begin with a number sign (#), nor a valid query string begin with a question mark (?). |
T:System.ArgumentOutOfRangeException | port is less than -1 or greater than 65,535. |
Definition at line 409 of file UriBuilder.cs.
◆ Equals()
override bool System.UriBuilder.Equals |
( |
object |
rparam | ) |
|
Compares an existing T:System.Uri instance with the contents of the T:System.UriBuilder for equality.
- Parameters
-
rparam | The object to compare with the current instance. |
- Returns
true
if rparam represents the same T:System.Uri as the T:System.Uri constructed by this T:System.UriBuilder instance; otherwise, false
.
Definition at line 446 of file UriBuilder.cs.
◆ GetHashCode()
override int System.UriBuilder.GetHashCode |
( |
| ) |
|
Returns the hash code for the URI.
- Returns
- The hash code generated for the URI.
Definition at line 458 of file UriBuilder.cs.
◆ ToString()
override string System.UriBuilder.ToString |
( |
| ) |
|
Returns the display string for the specified T:System.UriBuilder instance.
- Returns
- The string that contains the unescaped display string of the T:System.UriBuilder.
- Exceptions
-
T:System.UriFormatException | In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.FormatException, instead.The T:System.UriBuilder instance has a bad password. |
Definition at line 493 of file UriBuilder.cs.
◆ Fragment
string System.UriBuilder.Fragment |
|
getset |
Gets or sets the fragment portion of the URI.
- Returns
- The fragment portion of the URI. The fragment identifier ("#") is added to the beginning of the fragment.
Definition at line 75 of file UriBuilder.cs.
◆ Host
string System.UriBuilder.Host |
|
getset |
Gets or sets the Domain Name System (DNS) host name or IP address of a server.
- Returns
- The DNS host name or IP address of the server.
Definition at line 101 of file UriBuilder.cs.
◆ Password
string System.UriBuilder.Password |
|
getset |
Gets or sets the password associated with the user that accesses the URI.
- Returns
- The password of the user that accesses the URI.
Definition at line 127 of file UriBuilder.cs.
◆ Path
string System.UriBuilder.Path |
|
getset |
Gets or sets the path to the resource referenced by the URI.
- Returns
- The path to the resource referenced by the URI.
Definition at line 149 of file UriBuilder.cs.
◆ Port
int System.UriBuilder.Port |
|
getset |
Gets or sets the port number of the URI.
- Returns
- The port number of the URI.
- Exceptions
-
T:System.ArgumentOutOfRangeException | The port cannot be set to a value less than -1 or greater than 65,535. |
Definition at line 172 of file UriBuilder.cs.
◆ Query
string? System.UriBuilder.Query |
|
getset |
Gets or sets any query information included in the URI.
- Returns
- The query information included in the URI.
Definition at line 194 of file UriBuilder.cs.
◆ Scheme
string System.UriBuilder.Scheme |
|
getset |
Gets or sets the scheme name of the URI.
- Returns
- The scheme of the URI.
- Exceptions
-
T:System.ArgumentException | The scheme cannot be set to an invalid scheme name. |
Definition at line 221 of file UriBuilder.cs.
◆ Uri
Uri System.UriBuilder.Uri |
|
get |
Gets the T:System.Uri instance constructed by the specified T:System.UriBuilder instance.
- Returns
- A T:System.Uri that contains the URI constructed by the T:System.UriBuilder.
- Exceptions
-
T:System.UriFormatException | In the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.FormatException, instead.The URI constructed by the T:System.UriBuilder properties is invalid. |
Definition at line 258 of file UriBuilder.cs.
◆ UserName
string System.UriBuilder.UserName |
|
getset |
The user name associated with the user that accesses the URI.
- Returns
- The user name of the user that accesses the URI.
Definition at line 276 of file UriBuilder.cs.
The documentation for this class was generated from the following file: