ProfilePropertySettings 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 ProfilePropertySettings 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| ProfilePropertySettings(String) |
使用指定名称初始化类的新实例 ProfilePropertySettings 。 |
| ProfilePropertySettings(String, Boolean, SerializationMode, String, String, String, Boolean, String) |
使用指定的名称和设置初始化类的新实例 ProfilePropertySettings 。 |
ProfilePropertySettings(String)
使用指定名称初始化类的新实例 ProfilePropertySettings 。
public:
ProfilePropertySettings(System::String ^ name);
public ProfilePropertySettings(string name);
new System.Web.Configuration.ProfilePropertySettings : string -> System.Web.Configuration.ProfilePropertySettings
Public Sub New (name As String)
参数
- name
- String
对象的唯一名称 ProfilePropertySettings 。
注解
下表显示了用于此构造函数的默认设置。
| 设置 | 默认值 |
|---|---|
| AllowAnonymous |
false。 |
| DefaultValue | 空字符串(“)。 |
| ReadOnly |
false。 |
| SerializeAs | ProviderSpecific。 |
| Type | 空字符串(“)。 |
另请参阅
适用于
ProfilePropertySettings(String, Boolean, SerializationMode, String, String, String, Boolean, String)
使用指定的名称和设置初始化类的新实例 ProfilePropertySettings 。
public:
ProfilePropertySettings(System::String ^ name, bool readOnly, System::Web::Configuration::SerializationMode serializeAs, System::String ^ providerName, System::String ^ defaultValue, System::String ^ profileType, bool allowAnonymous, System::String ^ customProviderData);
public ProfilePropertySettings(string name, bool readOnly, System.Web.Configuration.SerializationMode serializeAs, string providerName, string defaultValue, string profileType, bool allowAnonymous, string customProviderData);
new System.Web.Configuration.ProfilePropertySettings : string * bool * System.Web.Configuration.SerializationMode * string * string * string * bool * string -> System.Web.Configuration.ProfilePropertySettings
Public Sub New (name As String, readOnly As Boolean, serializeAs As SerializationMode, providerName As String, defaultValue As String, profileType As String, allowAnonymous As Boolean, customProviderData As String)
参数
- name
- String
对象的唯一名称 ProfilePropertySettings 。
- readOnly
- Boolean
- serializeAs
- SerializationMode
其中一个 SerializationMode 值。
- defaultValue
- String
一个字符串,其中包含在生成的页配置文件类中用于命名属性的默认值。
- profileType
- String
有效的类型引用或空字符串。
- allowAnonymous
- Boolean
true 如果指示动态生成的 ProfileCommon 类中的关联属性应支持匿名用户;否则, false指示匿名用户无法更改命名属性。
- customProviderData
- String
包含与属性关联的提供程序使用的提供程序特定信息的字符串。
注解
在运行时,ASP.NET 编译系统使用配置文件节中指定的 profile 信息来生成一 ProfileCommon个名为(派生自 ProfileBase)的类。 该类允许你访问和修改各个用户配置文件的值。
类ProfileCommon定义基于配置文件节的子节properties中profile定义的属性。 创建类实例 ProfilePropertySettings 时指定的参数值将用于定义类中的 ProfileCommon 关联属性。
有关配置文件属性的详细信息,请参阅 ASP.NET 配置文件属性概述。