SqlFeatures 枚举

定义

指定要使用 SqlServices 类提供的方法安装或移除的 ASP.Net 功能。Specifies the ASP.Net features to install or remove using the methods provided by the SqlServices class.

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

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

字段

All 1073741855

所有功能。All features.

Membership 1

成员资格功能。The membership feature.

None 0

无功能。No features.

Personalization 8

个性化功能。The personalization feature.

Profile 2

配置文件功能。The profile feature.

RoleManager 4

角色管理器功能。The role manager feature.

SqlWebEventProvider 16

Web 事件提供程序功能。The Web event provider feature.

示例

下面的代码示例演示如何SqlFeatures Install(String, SqlFeatures, String)通过SqlServices类的方法使用枚举。The following code example shows how to use the SqlFeatures enumeration with the Install(String, SqlFeatures, String) method of the SqlServices class.

// Install membership and personalization.
SqlServices.Install(database,
    SqlFeatures.Membership &
    SqlFeatures.Personalization,
    connectionString);
' Install membership and personalization.
SqlServices.Install(database, _
    SqlFeatures.Membership And _
    SqlFeatures.Personalization, _
    connectionString)

注解

此枚举具有FlagsAttribute, 这意味着可以通过将&两个或多个功能与 (和) 运算符 (Visual Basic 中的And运算符) 组合来选择它。This enumeration has a FlagsAttribute, which means you can select two or more features by combining them with the & (and) operator (the And operator in Visual Basic).

适用于

另请参阅