ProfilePropertyMetadata 类

定义

提供描述配置文件属性的值的集合。Provides a collection of values that describe a profile property.

public ref class ProfilePropertyMetadata
public ref class ProfilePropertyMetadata : System::Runtime::Serialization::IExtensibleDataObject
[System.Runtime.Serialization.DataContract]
public class ProfilePropertyMetadata
[System.Runtime.Serialization.DataContract]
public class ProfilePropertyMetadata : System.Runtime.Serialization.IExtensibleDataObject
[<System.Runtime.Serialization.DataContract>]
type ProfilePropertyMetadata = class
[<System.Runtime.Serialization.DataContract>]
type ProfilePropertyMetadata = class
    interface IExtensibleDataObject
Public Class ProfilePropertyMetadata
Public Class ProfilePropertyMetadata
Implements IExtensibleDataObject
继承
ProfilePropertyMetadata
属性
实现

注解

ProfilePropertyMetadata通过类访问配置文件时,使用类检索有关配置文件属性的信息 ProfileServiceYou use the ProfilePropertyMetadata class to retrieve information about a profile property when you access profiles through the ProfileService class. 您可以检索属性的名称和类型,无论该属性是否为只读,是否可由未经身份验证的用户访问以及默认值。You can retrieve the name and type of the property, whether it is read-only, whether it can be accessed by users who have not been authenticated, and the default value. 应用程序可以根据这些值采取适当的操作,例如不尝试设置只读属性。An application can take the appropriate actions based on these values, such as not trying to set a read-only property.

若要 ProfilePropertyMetadata 从与 Windows Communication Framework (WCF) 兼容的应用程序访问对象,请使用类的 GetPropertiesMetadata 方法 ProfileServiceTo access the ProfilePropertyMetadata object from an application that is compatible with the Windows Communication Framework (WCF), use the GetPropertiesMetadata method of the ProfileService class. 用户不必登录即可检索 ProfilePropertyMetadata 对象,因为配置文件属性的元数据不特定于用户的配置文件属性值。The user does not have to be logged on to retrieve the ProfilePropertyMetadata object because the metadata for profile properties is not specific to a user's profile property values.

ProfilePropertyMetadata当定义属性时,将在节的元素的 Web.config 文件中设置类中的值。The values in the ProfilePropertyMetadata class are set in the Web.config file in the element of the section when the property is defined.

构造函数

ProfilePropertyMetadata()

初始化 ProfilePropertyMetadata 类的新实例。Initializes a new instance of the ProfilePropertyMetadata class.

属性

AllowAnonymousAccess

获取或设置一个指示该属性是否可由未经身份验证的用户使用的值。Gets or sets a value that indicates whether the property is available to unauthenticated users.

DefaultValue

获取或设置该属性的默认值。Gets or sets the default value of the property.

ExtensionData

获取或设置对 ExtensionDataObject 实例的引用。Gets or sets a reference to an ExtensionDataObject instance.

IsReadOnly

获取或设置一个指示配置文件属性是否为只读的值。Gets or sets a value that indicates whether a profile property is read-only.

PropertyName

获取或设置配置文件属性的名称。Gets or sets the name of the profile property.

SerializeAs

获取或设置一个指示如何序列化属性值的值。Gets or sets a value that indicates how to serialize the property value.

TypeName

获取或设置配置文件属性类型的程序集限定名称。Gets or sets the assembly-qualified name of the profile property type.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于