UriBuilder UriBuilder UriBuilder UriBuilder Class

定义

为统一资源标识符 (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
继承
UriBuilderUriBuilderUriBuilderUriBuilder

注解

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() UriBuilder() UriBuilder()

初始化 UriBuilder 类的新实例。Initializes a new instance of the UriBuilder class.

UriBuilder(String) UriBuilder(String) UriBuilder(String) UriBuilder(String)

用指定的 URI 初始化 UriBuilder 类的新实例。Initializes a new instance of the UriBuilder class with the specified URI.

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

用指定的方案和主机初始化 UriBuilder 类的新实例。Initializes a new instance of the UriBuilder class with the specified scheme and host.

UriBuilder(String, String, Int32) UriBuilder(String, String, Int32) UriBuilder(String, String, Int32) 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(String, String, Int32, String) UriBuilder(String, String, Int32, String) 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(String, String, Int32, String, String) UriBuilder(String, String, Int32, String, String) 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) UriBuilder(Uri) UriBuilder(Uri)

使用指定的 UriBuilder 实例初始化 Uri 类的新实例。Initializes a new instance of the UriBuilder class with the specified Uri instance.

属性

Fragment Fragment Fragment Fragment

获取或设置 URI 的段部分。Gets or sets the fragment portion of the URI.

Host Host Host Host

获取或设置服务器的域名系统 (DNS) 主机名或 IP 地址。Gets or sets the Domain Name System (DNS) host name or IP address of a server.

Password Password Password Password

获取或设置与访问 URI 的用户关联的密码。Gets or sets the password associated with the user that accesses the URI.

Path Path Path Path

获取或设置 URI 引用的资源的路径。Gets or sets the path to the resource referenced by the URI.

Port Port Port Port

获取或设置 URI 的端口号。Gets or sets the port number of the URI.

Query Query Query Query

获取或设置 URI 中包括的任何查询信息。Gets or sets any query information included in the URI.

Scheme Scheme Scheme Scheme

获取或设置 URI 的方案名称。Gets or sets the scheme name of the URI.

Uri Uri Uri Uri

获取由指定的 UriBuilder 实例构造的 Uri 实例。Gets the Uri instance constructed by the specified UriBuilder instance.

UserName UserName UserName UserName

与访问 URI 的用户关联的用户名。The user name associated with the user that accesses the URI.

方法

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

比较现有 Uri 实例与 UriBuilder 的内容是否相等。Compares an existing Uri instance with the contents of the UriBuilder for equality.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

返回 URI 的哈希代码。Returns the hash code for the URI.

GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

返回指定 UriBuilder 实例的显示字符串。Returns the display string for the specified UriBuilder instance.

适用于

另请参阅