語言

GenericUriParser 類別

定義

一個可自訂的分層式 URI 解析器。

public ref class GenericUriParser : UriParser
public class GenericUriParser : UriParser
type GenericUriParser = class
    inherit UriParser
Public Class GenericUriParser
Inherits UriParser
繼承
GenericUriParser

備註

如果你想根據知名的方案建立解析器,請使用 HttpStyleUriParser、 FtpStyleUriParser、 GopherStyleUriParser、 LdapStyleUriParser或 NewsStyleUriParser。

在建立可自訂的語法分析器時,透過將列舉中 System.GenericUriParserOptions 可用值的位元組合傳遞給 GenericUriParser 建構子來指定解析器的行為。

此 System.Uri 類別支援國際資源識別碼(IRI)及國際化網域名稱(IDN)。 衍生自 的 GenericUriParser 解析器預設不支援 IRI 和 IDN。 此 Default 選項不包含 IRI 和 IDN 支援。 與GenericUriParserOptions.Idn欄位GenericUriParserOptions.IriParsing分別表示自訂解析器是否支援 IDN 和 IRI。

欲了解更多關於IRI與IDN支援的資訊,請參閱本 System.Uri 課程備註區。

建構函式

名稱 Description
GenericUriParser(GenericUriParserOptions)

為階層式 URI 建立可自訂的解析器。

方法

名稱 Description
Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetComponents(Uri, UriComponents, UriFormat)

從 URI 取得元件。

(繼承來源 UriParser)
GetHashCode()

做為預設哈希函式。

(繼承來源 Object)
GetType()

取得目前實例的 Type。

(繼承來源 Object)
InitializeAndValidate(Uri, UriFormatException)

初始化解析器的狀態並驗證 URI。

(繼承來源 UriParser)
IsBaseOf(Uri, Uri)

判斷 baseUri 是否為 的 relativeUri基礎 URI。

(繼承來源 UriParser)
IsWellFormedOriginalString(Uri)

表示URI是否為良構。

(繼承來源 UriParser)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
OnNewUri()

由 Uri 建構者呼叫以取得實 UriParser 例。

(繼承來源 UriParser)
OnRegister(String, Int32)

當方法註冊時 UriParser ,框架會呼叫。

(繼承來源 UriParser)
Resolve(Uri, Uri, UriFormatException)

由 Uri 建構者呼叫,用 TryCreate 來解析相對的 URI。

(繼承來源 UriParser)
ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)

適用於