Share via


AreaListingCollection Class

NOTE: This API is now obsolete.

Manages the AreaListing objects.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.Portal.SiteData.AreaListingCollection

Namespace:  Microsoft.SharePoint.Portal.SiteData
Assembly:  Microsoft.SharePoint.Portal (in Microsoft.SharePoint.Portal.dll)

Syntax

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

Examples

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

AreaListingCollection listingsTopics = areaTopics.Listings;

// Add a new listing.
listingNew = listingsTopics.AddListing("New Listing Title",
"New Listing Description",
ListingType.ExternalUrl,
"http://example.com",
new Guid[] { });
listingNew.Update(); // complete the creation

// Iterate over the collection, then remove the new listing.
foreach (AreaListing listing in listingsTopics)
{
// Look for, then remove, the newly added listing.
if (listing.Title == listingNew.Title)
   {
   listingsTopics.RemoveListing(listing.ID);
   // After removing listing, collection isn't sane until
   // refreshed, so break.
   break;
   }
}

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

AreaListingCollection Members

Microsoft.SharePoint.Portal.SiteData Namespace