GenericUriParser Class

Definition

階層式 URI 的可自訂剖析器。A customizable parser for a hierarchical URI.

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

Remarks

如果您想要根據知名配置建立剖析器,請使用 HttpStyleUriParserFtpStyleUriParserGopherStyleUriParserLdapStyleUriParserNewsStyleUriParserIf you want to create a parser based on a well-known scheme, use HttpStyleUriParser, FtpStyleUriParser, GopherStyleUriParser, LdapStyleUriParser, or NewsStyleUriParser.

建立可自訂的剖析器時,剖析器的行為是藉由將 System.GenericUriParserOptions 列舉中可用值的位元組合傳遞給 GenericUriParser 的分析程式來指定。When creating a customizable parser, the behavior of the parser is specified by passing a bitwise combination of the values available in the System.GenericUriParserOptions enumeration to the GenericUriParser constructor.

已擴充現有的 System.Uri 類別,以提供國際資源識別碼(IRI)和國際化功能變數名稱(IDN)的支援。The existing System.Uri class has been extended to provide support for International Resource Identifiers (IRI) and Internationalized Domain Names (IDN). 目前的使用者除非特別啟用 IRI,否則看不出與 .NET Framework 2.0 的行為有任何不同之處。Current users will not see any change from the .NET Framework 2.0 behavior unless they specifically enable IRI. 這可確保應用程式與舊版 .NET framework 相容。This ensures application compatibility with prior versions of the .NET Framework.

根據預設,所有衍生自 GenericUriParser 的剖析器都不會取得 IRI 和 IDN 支援。All parsers derived from GenericUriParser will not gain IRI and IDN support by default. [Default] 選項不包括 IRI 和 IDN 支援。The Default option does not include IRI and IDN support. System.GenericUriParserOptions 列舉中會加入兩個新的值,以指出自訂剖析器是否支援 IRI 和 IDN。Two new values are added to the System.GenericUriParserOptions enumeration to indicate if a custom parser supports IRI and IDN.

如需 IRI 和 IDN 支援的詳細資訊,請參閱 System.Uri 類別的「備註」一節。For more information on IRI and IDN support, see the Remarks section for the System.Uri class.

Constructors

GenericUriParser(GenericUriParserOptions)

建立階層式 URI 的可自訂剖析器。Create a customizable parser for a hierarchical URI.

Methods

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetComponents(Uri, UriComponents, UriFormat)

從 URI 取得元件。Gets the components from a URI.

(Inherited from UriParser)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType()

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

(Inherited from Object)
InitializeAndValidate(Uri, UriFormatException)

初始化剖析器狀態並驗證 URI。Initialize the state of the parser and validate the URI.

(Inherited from UriParser)
IsBaseOf(Uri, Uri)

判斷 baseUri 是否為 relativeUri 的基底 URI。Determines whether baseUri is a base URI for relativeUri.

(Inherited from UriParser)
IsWellFormedOriginalString(Uri)

指出 URI 是否語式正確。Indicates whether a URI is well-formed.

(Inherited from UriParser)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(Inherited from Object)
OnNewUri()

Uri 建構函式叫用,以取得 UriParser 執行個體。Invoked by a Uri constructor to get a UriParser instance.

(Inherited from UriParser)
OnRegister(String, Int32)

UriParser 方法已註冊時,由 Framework 叫用。Invoked by the Framework when a UriParser method is registered.

(Inherited from UriParser)
Resolve(Uri, Uri, UriFormatException)

Uri 建構函式和 TryCreate 呼叫,以解析相對 URI。Called by Uri constructors and TryCreate to resolve a relative URI.

(Inherited from UriParser)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

Applies to