UriIdnScope 枚举


提供 IdnElement 命名空间中的 System.Configuration 的配置设置的可能值。Provides the possible values for the configuration setting of the IdnElement in the System.Configuration namespace.

public enum class UriIdnScope
public enum UriIdnScope
type UriIdnScope = 
Public Enum UriIdnScope


All 2

此值会将所有 Unicode 域名转换为它们的 Punycode 等效项(IDN 名称)。This value will convert any Unicode domain names to their Punycode equivalents (IDN names).

AllExceptIntranet 1

此值会将所有外部 Unicode 域名转换为使用 Punycode 等效项(IDN 名称)。This value will convert all external Unicode domain names to use the Punycode equivalents (IDN names). 在这种情况下,若要处理本地 Intranet 上的国际化名称,用于 Intranet 的 DNS 服务器应该支持 Unicode 名称。In this case to handle international names on the local Intranet, the DNS servers that are used for the Intranet should support Unicode names.

None 0

请勿将任何 Unicode 域名转换为使用 Punycode。Don't convert any Unicode domain names to use Punycode.


现有 Uri 类已经过扩展,可基于 RFC 3987 (IR) 提供对国际资源标识符的支持。The existing Uri class has been extended to provide support for International Resource Identifiers (IR) based on RFC 3987.

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

System.Configuration.IdnElement当构造第一个类时,的配置设置将被读取一次 UriThe configuration setting for the System.Configuration.IdnElement will be read once when the first Uri class is constructed. 忽略时间后更改为默认设置。Changes to configuration settings after that time are ignored.

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