GenericUriParserOptions GenericUriParserOptions GenericUriParserOptions GenericUriParserOptions Enum

定义

指定 UriParser 的选项。Specifies options for a UriParser.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class GenericUriParserOptions
[System.Flags]
public enum GenericUriParserOptions
type GenericUriParserOptions = 
Public Enum GenericUriParserOptions
继承
GenericUriParserOptionsGenericUriParserOptionsGenericUriParserOptionsGenericUriParserOptions
属性

字段

AllowEmptyAuthority AllowEmptyAuthority AllowEmptyAuthority AllowEmptyAuthority 2

此分析器允许没有证书颁发机构的 URI。The parser allows a URI with no authority.

Default Default Default Default 0

分析器:需要授权;将反斜杠转换为正斜杠;反转义路径点、正斜杠和反斜杠;并删除末尾的点、空段和只包含点的段。The parser: requires an authority; converts backslashes into forward slashes; unescapes path dots, forward slashes, and back slashes; and removes trailing dots, empty segments, and dots-only segments.

DontCompressPath DontCompressPath DontCompressPath DontCompressPath 128

此分析器不对 URI 进行规范化。The parser does not canonicalize the URI.

DontConvertPathBackslashes DontConvertPathBackslashes DontConvertPathBackslashes DontConvertPathBackslashes 64

此分析器不将反斜杠转换为正斜杠。The parser does not convert back slashes into forward slashes.

DontUnescapePathDotsAndSlashes DontUnescapePathDotsAndSlashes DontUnescapePathDotsAndSlashes DontUnescapePathDotsAndSlashes 256

此分析器不对路径点、正斜杠或反斜杠进行转义还原。The parser does not unescape path dots, forward slashes, or back slashes.

GenericAuthority GenericAuthority GenericAuthority GenericAuthority 1

此分析器允许基于注册表的证书颁发机构。The parser allows a registry-based authority.

Idn Idn Idn Idn 512

分析器支持对主机名进行国际化域名 (IDN) 语法分析。The parser supports Internationalized Domain Name (IDN) parsing (IDN) of host names. 是否使用 IDN 由配置值指定。Whether IDN is used is dictated by configuration values.

IriParsing IriParsing IriParsing IriParsing 1024

分析器支持 RFC 3987 中指定的国际资源标识符 (IRI) 语法分析规则。The parser supports the parsing rules specified in RFC 3987 for International Resource Identifiers (IRI). 是否使用 IRI 由配置值指定。Whether IRI is used is dictated by configuration values.

NoFragment NoFragment NoFragment NoFragment 32

此方案不定义段部分。The scheme does not define a fragment part.

NoPort NoPort NoPort NoPort 8

此方案不定义端口。The scheme does not define a port.

NoQuery NoQuery NoQuery NoQuery 16

此方案不定义查询部分。The scheme does not define a query part.

NoUserInfo NoUserInfo NoUserInfo NoUserInfo 4

此方案不定义用户信息部分。The scheme does not define a user information part.

注解

可以将上述任何选项来配置通过将选项传递的参数作为泛型的 URI 分析器组合GenericUriParser.GenericUriParser(GenericUriParserOptions)构造函数。You can combine any of these options to configure a generic URI parser by passing the options as a parameter to the GenericUriParser.GenericUriParser(GenericUriParserOptions) constructor.

现有System.Uri类已扩展为国际资源标识符 (IRI) 根据 RFC 3987 提供支持。The existing System.Uri class has been extended to provide support for International Resource Identifiers (IRI) based on RFC 3987. 除非当前用户专门启用 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.

配置设置System.Configuration.IdnElement间接受System.Configuration.IriParsingElement配置设置控制中的 IRI 处理System.Uri类。The configuration setting for the System.Configuration.IdnElement is indirectly controlled by the System.Configuration.IriParsingElement configuration setting that controls IRI processing in the System.Uri class. 必须启用 IRI 处理才能进行 IDN 处理。IRI processing must be enabled for IDN processing to be possible. 如果禁用 IRI,IDN 处理将被设置为默认值,这时 NET Framework 2.0 行为用于兼容性,并且 IDN 名称不可用。If IRI processing is disabled, then IDN processing will be set to the default setting where the .NET Framework 2.0 behavior is used for compatibility and IDN names are not used.

国际化域名 (IDN) 属性仅控制 IDN 处理。The Internationalized Domain Name (IDN) attribute only controls IDN processing. 默认情况下执行所有其他 IRI 处理 (例如字符规范化)。All other IRI processing (character normalization, for example) is performed by default.

IRI 支持的详细信息,请参阅备注部分System.Uri类。For more information on IRI support, see the Remarks section for the System.Uri class.

适用于

另请参阅