Compartilhar via


CoreProperty Class

Represents the definition for the most fundamental elements of a profile property. Different profile types can share the same core properties.

Inheritance Hierarchy

System.Object
  Microsoft.Office.Server.UserProfiles.PropertyBase
    Microsoft.Office.Server.UserProfiles.CoreProperty

Namespace:  Microsoft.Office.Server.UserProfiles
Assembly:  Microsoft.Office.Server.UserProfiles (in Microsoft.Office.Server.UserProfiles.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public NotInheritable Class CoreProperty _
    Inherits PropertyBase
'Usage
Dim instance As CoreProperty
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public sealed class CoreProperty : PropertyBase

Remarks

Property provides backward compatibility for older custom solutions. For new custom solutions created for Microsoft SharePoint Server 2010 , use CoreProperty, ProfileTypeProperty, and ProfileSubtypeProperty, which provide more granular control over user profile properties.

There are two types of user profile core properties:

  • Regular.Defines the core property data type and the corresponding user profile flags.

  • Section.Core property that serves as a separator for user interface grouping purposes.

    Because of the nature of the Section type, the following properties are not applicable to it: Type, Length, IsMultivalued, IsAlias, IsSearchable, and Separator. If you try to set a value, an UpdateReadOnlyFieldException is thrown.

    For regular properties, the Name, Type, Length, and IsMultivalued properties can only be set at creation time. No further update is allowed. If there is an attempt to update, an UpdateReadOnlyFieldException is thrown. The Name property is used to compose the URI of the property. Therefore the name must be a valid URI schema name, otherwise an InvalidValueException is thrown.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

CoreProperty Members

Microsoft.Office.Server.UserProfiles Namespace