Partager via


AreaCollection, classe (Microsoft.SharePoint.Portal.SiteData)

Obsolète.  

Manages areas.

Espace de noms : Microsoft.SharePoint.Portal.SiteData
Assembly : Microsoft.SharePoint.Portal (dans microsoft.sharepoint.portal.dll)

Syntaxe

'Déclaration
<DefaultMemberAttribute("Item")> _
<ObsoleteAttribute("This class is obsolete.")> _
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public Class AreaCollection
    Implements IEnumerable
'Utilisation
Dim instance As AreaCollection
[DefaultMemberAttribute("Item")] 
[ObsoleteAttribute("This class is obsolete.")] 
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel=true)] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
public class AreaCollection : IEnumerable

Exemple

The following code example shows the use of the AreaCollection class.

AreaCollection areasTopics = areaTopics.Areas;

for (uint i = 0; i < areasTopics.Count; i++)
{
Console.WriteLine(areasTopics[i].Title);
}

foreach (Area area in areasTopics)
{
Console.WriteLine(area.Description);
}

// add a new area
Area areaNew = areasTopics.AddArea("New area title");
Console.WriteLine(areaNew.Title);

// remove the newly created area
areasTopics.RemoveArea(areaNew.ID);

// recreate it
areaNew = areasTopics.AddArea("New area Title");

Hiérarchie d'héritage

System.Object
  Microsoft.SharePoint.Portal.SiteData.AreaCollection

Sécurité des threads

Les membres statiques publics de ce type (Shared en Visual Basic) sont sécurisés au niveau des threads. Il n'est pas garanti que les membres d'instance soient sécurisés au niveau des threads.

Voir aussi

Référence

Membres AreaCollection
Microsoft.SharePoint.Portal.SiteData, espace de noms