UriBuilder 類別

定義

提供統一資源識別元 (URI) 的自訂建構函式,並修改 Uri 類別的 URI。Provides a custom constructor for uniform resource identifiers (URIs) and modifies URIs for the Uri class.

public ref class UriBuilder
public class UriBuilder
type UriBuilder = class
Public Class UriBuilder
繼承
UriBuilder

備註

UriBuilder 類別提供一個便利的方式來修改 Uri 實例的內容,而不需針對每個修改建立新的 Uri 實例。The UriBuilder class provides a convenient way to modify the contents of a Uri instance without creating a new Uri instance for each modification.

UriBuilder 屬性會提供唯讀 Uri 屬性的讀取/寫入存取權,以便進行修改。The UriBuilder properties provide read/write access to the read-only Uri properties so that they can be modified.

建構函式

UriBuilder()

初始化 UriBuilder 類別的新執行個體。Initializes a new instance of the UriBuilder class.

UriBuilder(String)

使用指定的 URI,初始化 UriBuilder 類別的新執行個體。Initializes a new instance of the UriBuilder class with the specified URI.

UriBuilder(String, String)

使用指定的配置和主機,初始化 UriBuilder 類別的新執行個體。Initializes a new instance of the UriBuilder class with the specified scheme and host.

UriBuilder(String, String, Int32)

使用指定的配置、主機和連接埠,初始化 UriBuilder 類別的新執行個體。Initializes a new instance of the UriBuilder class with the specified scheme, host, and port.

UriBuilder(String, String, Int32, String)

使用指定的配置、主機、連接埠編號和路徑,初始化 UriBuilder 類別的新執行個體。Initializes a new instance of the UriBuilder class with the specified scheme, host, port number, and path.

UriBuilder(String, String, Int32, String, String)

使用指定的配置、主機、連接埠編號、路徑和查詢字串或片段識別項,初始化 UriBuilder 類別的新執行個體。Initializes a new instance of the UriBuilder class with the specified scheme, host, port number, path and query string or fragment identifier.

UriBuilder(Uri)

使用指定的 UriBuilder 執行個體,初始化 Uri 類別的新執行個體。Initializes a new instance of the UriBuilder class with the specified Uri instance.

屬性

Fragment

取得或設定 URI 的片段部分。Gets or sets the fragment portion of the URI.

Host

取得或設定伺服器的網域名稱系統 (DNS) 主機名稱或 IP 位址。Gets or sets the Domain Name System (DNS) host name or IP address of a server.

Password

取得或設定存取 URI 之使用者的相關密碼。Gets or sets the password associated with the user that accesses the URI.

Path

取得或設定 URI 參考的資源路徑。Gets or sets the path to the resource referenced by the URI.

Port

取得或設定 URI 的連接埠編號。Gets or sets the port number of the URI.

Query

取得或設定 URI 所包含的任何查詢資訊。Gets or sets any query information included in the URI.

Scheme

取得或設定 URI 的配置名稱。Gets or sets the scheme name of the URI.

Uri

取得指定的 Uri 執行個體建構的 UriBuilder 執行個體 。Gets the Uri instance constructed by the specified UriBuilder instance.

UserName

存取 URI 之使用者的相關使用者名稱。The user name associated with the user that accesses the URI.

方法

Equals(Object)

比較現有的 Uri 執行個體和 UriBuilder 的內容,檢查是否相等。Compares an existing Uri instance with the contents of the UriBuilder for equality.

GetHashCode()

傳回 URI 的雜湊碼。Returns the hash code for the URI.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回所指定 UriBuilder 執行個體的顯示字串。Returns the display string for the specified UriBuilder instance.

適用於

另請參閱