次の方法で共有


SPPersistedObjectCollection<T> class

Provides a base class for collections that manage SPPersistedObject objects.

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPPersistedObjectCollection<T>
    Microsoft.SharePoint.Administration.SPPersistedChildCollection<T>
    Microsoft.SharePoint.Administration.SPPersistedDependencyCollection<T>

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
Public MustInherit Class SPPersistedObjectCollection(Of T As SPPersistedObject) _
    Implements IEnumerable(Of T), IEnumerable
'Usage
Dim instance As SPPersistedObjectCollection(Of T)
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public abstract class SPPersistedObjectCollection<T> : IEnumerable<T>, 
    IEnumerable
where T : SPPersistedObject

Type parameters

  • T
    The type of object contained in the collection.

Remarks

Use an indexer to return a single persisted object from the collection. For example, if the collection is assigned to a variable named myPersistedObjects, use myPersistedObjects[index] in C#, or myPersistedObjects(index) in Visual Basic, where index is either the name or the GUID that identifies the persisted object in the collection.

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

SPPersistedObjectCollection<T> members

Microsoft.SharePoint.Administration namespace