ConfigurationEnumValue 类

定义

在 IIS 7 配置系统中定义一个属性,该属性根据接受的架构定义的值列表进行验证。

public ref class ConfigurationEnumValue sealed
public sealed class ConfigurationEnumValue
type ConfigurationEnumValue = class
Public NotInheritable Class ConfigurationEnumValue
继承
ConfigurationEnumValue

注解

配置枚举值是 IIS 7 配置系统中的一个属性,它根据架构中配置的接受值列表进行验证。

以下示例架构定义配置枚举值:

<sectionSchema name="system.webServer/security/authentication/basicAuthentication">  
  <attribute name="enabled" type="bool" defaultValue="false" />  
  <attribute name="realm" type="string" />  
  <attribute name="defaultLogonDomain" type="string" />  
  <attribute name="logonMethod" type="enum" defaultValue="ClearText">  
    <enum name="Interactive" value="0" />  
    <enum name="Batch" value="1" />  
    <enum name="Network" value="2" />  
    <enum name="ClearText" value="3" />  
  </attribute>  
</sectionSchema>  

以下配置值表示在上面定义的 元素的配置系统中 <basicAuthentication> 存储的数据:

<basicAuthentication defaultLogonDomain="FABRIKAM" enabled="true" logonMethod="Cleartext" realm="FABRIKAM" />  

属性

Name

获取配置枚举值的名称。

Value

获取配置枚举属性的值。

适用于