Condividi tramite


GenericUriParser Constructor

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Create a customizable parser for a hierarchical URI.

Namespace:  System
Assembly:  System (in System.dll)

Syntax

'Declaration
Public Sub New ( _
    options As GenericUriParserOptions _
)
public GenericUriParser(
    GenericUriParserOptions options
)

Parameters

Remarks

Use this constructor as an argument to UriParser.Register(UriParser, String, Int32)

If you want to create a parser based on a well-known scheme, use HttpStyleUriParser or FtpStyleUriParser.

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.

The existing System.Uri class has been extended to provide support for International Resource Identifiers (IRI) and Internationalized Domain Names (IDN). Current users will not see any change from the .NET Framework 2.0 behavior unless they specifically enable IRI. This ensures application compatibility with prior versions of the .NET Framework.

All parsers derived from GenericUriParser will not gain IRI and IDN support by default. The Default option does not include IRI and IDN support. Two new values are added to the System.GenericUriParserOptions enumeration to indicate if a custom parser supports IRI and IDN.

The IriParsing type indicates the parser supports the parsing rules specified in RFC 3987 for International Resource Identifiers (IRI). Whether IRI is used is dictated by configuration values.

The Idn type indicates the parser supports Internationalized Domain Name (IDN) parsing (IDN) of host names.

The Internationalized Domain Name (IDN) attribute only controls IDN processing. All other IRI processing (character normalization, for example) is performed by default.

For more information on IRI and IDN support, see the Remarks section for the System.Uri class.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.