Freigeben über


PropertyCollection-Klasse

HINWEIS: Diese API ist veraltet.

Stellt eine Auflistung von Property -Objekten dar.

Vererbungshierarchie

System.Object
  Microsoft.Office.Server.UserProfiles.PropertyCollection

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

Syntax

'Declaration
<ObsoleteAttribute("PropertyCollection is replaced by ProfileSubtypePropertyManager.")> _
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public Class PropertyCollection _
    Implements IEnumerable
'Usage
Dim instance As PropertyCollection
[ObsoleteAttribute("PropertyCollection is replaced by ProfileSubtypePropertyManager.")]
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class PropertyCollection : IEnumerable

Hinweise

Verwenden Sie die PropertyCollection -Klasse alle an einem Standort definierte Eigenschaften aufgelistet werden.

Beispiele

Das folgende Codebeispiel veranschaulicht die Verwendung der PropertyCollection -Klasse.

      Public Sub SectionSample()
         'Get portal site context from topology.
         Dim strUrl As String = "http://SampleName"
         Dim tm As New TopologyManager()
         Dim ps As PortalSite = tm.PortalSites(New Uri(strUrl))
         Dim pc As PortalContext = PortalApplication.GetContext(ps)

         'Initialize user profile config manager object.
         Dim upcm As New UserProfileConfigManager(pc)

         'Sample to create a new section.
         Dim pcol As PropertyCollection = upcm.GetPropertiesWithSection()
         Dim mysection As [Property] = pcol.Create(True)
         mysection.Name = "my section"
         mysection.Commit()
         pcol.SetDisplayOrderBySectionName(mysection.Name, 0)
         pcol.CommitDisplayOrder()
      End Sub 'SectionSample
public void SectionSample()
{
//Get portal site context from topology.
string strUrl = "http://SampleName";
TopologyManager tm = new TopologyManager();
PortalSite ps = tm.PortalSites[new Uri(strUrl)];
PortalContext pc = PortalApplication.GetContext(ps);

//Initialize user profile config manager object.
UserProfileConfigManager upcm = new UserProfileConfigManager(pc);

//Sample to create a new section.
PropertyCollection pcol = upcm.GetPropertiesWithSection();
Property mysection = pcol.Create(true);
mysection.Name = "my section";
mysection.Commit();
pcol.SetDisplayOrderBySectionName(mysection.Name, 0);
pcol.CommitDisplayOrder();
}

Threadsicherheit

Alle öffentlichen static (Shared in Visual Basic) Member dieses Typs sind threadsicher. Die Threadsicherheit von Instanzmembern ist nicht gewährleistet.

Siehe auch

Referenz

PropertyCollection-Member

Microsoft.Office.Server.UserProfiles-Namespace