ProfilePropertySettings 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 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
true 指示动态生成的 ProfileCommon 类中关联的属性应是只读的;否则为 false。
- serializeAs
- SerializationMode
SerializationMode 值之一。
- defaultValue
- String
一个字符串,包含生成的页 Profile 类中的命名属性使用的默认值。
- profileType
- String
有效的类型引用或空字符串。
- allowAnonymous
- Boolean
true 指示动态生成的 ProfileCommon 类中关联的属性应支持匿名用户;否则为 false,指示匿名用户不能更改命名的属性。
- customProviderData
- String
一个字符串,包含与属性相关联的提供程序使用的特定于提供程序的信息。
注解
在运行时,ASP.NET 编译系统使用配置文件的 节中指定的 profile 信息来生成名为 ProfileCommon的类,该类派生自 ProfileBase。 类允许访问和修改单个用户配置文件的值。
类ProfileCommon定义基于配置文件 的 节的 子节profile中properties定义的属性。 在创建 类的 ProfilePropertySettings 实例时指定的参数值将用于定义类中的 ProfileCommon 关联属性。
有关配置文件属性的详细信息,请参阅 ASP.NET 配置文件属性概述。