IdnElement.Enabled IdnElement.Enabled IdnElement.Enabled IdnElement.Enabled Property

定义

获取或设置 IdnElement 配置设置的值。Gets or sets the value of the IdnElement configuration setting.

public:
 property UriIdnScope Enabled { UriIdnScope get(); void set(UriIdnScope value); };
[System.Configuration.ConfigurationProperty("enabled", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
[System.Configuration.ConfigurationProperty("enabled", DefaultValue=Mono.Cecil.CustomAttributeArgument, Options=System.Configuration.ConfigurationPropertyOptions.IsRequired | System.Configuration.ConfigurationPropertyOptions.IsKey)]
public UriIdnScope Enabled { get; set; }
member this.Enabled : UriIdnScope with get, set
Public Property Enabled As UriIdnScope

属性值

一个 UriIdnScope,其中包含用于 IDN 处理的当前配置设置。A UriIdnScope that contains the current configuration setting for IDN processing.

注解

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

IdnElement配置设置System.Configuration.IriParsingElementSystem.Uri控制类中的 IRI 处理的配置设置间接控制。The configuration setting for the 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.

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

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

适用于

另请参阅