Partilhar via


SPFeatureQueryResultCollection Class

Represents an enumerable collection of SPFeature objects.

Inheritance Hierarchy

System.Object
  Microsoft.SharePoint.SPFeatureQueryResultCollection

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<SubsetCallableTypeAttribute> _
<SubsetCallableExcludeInterfaceAttribute(SubsetCallableExcludeMemberType.ExplicitInterfaceProperty, ExcludeInterface := GetType(IEnumerator(Of SPFeature)))> _
<SubsetCallableExcludeInterfaceAttribute(SubsetCallableExcludeMemberType.ExplicitInterfaceProperty, ExcludeInterface := GetType(IEnumerator))> _
Public NotInheritable Class SPFeatureQueryResultCollection _
    Implements IEnumerator(Of SPFeature), IDisposable,  _
    IEnumerator, IEnumerable(Of SPFeature), IEnumerable
'Usage
Dim instance As SPFeatureQueryResultCollection
[SubsetCallableTypeAttribute]
[SubsetCallableExcludeInterfaceAttribute(SubsetCallableExcludeMemberType.ExplicitInterfaceProperty, ExcludeInterface = typeof(IEnumerator<SPFeature>))]
[SubsetCallableExcludeInterfaceAttribute(SubsetCallableExcludeMemberType.ExplicitInterfaceProperty, ExcludeInterface = typeof(IEnumerator))]
public sealed class SPFeatureQueryResultCollection : IEnumerator<SPFeature>, 
    IDisposable, IEnumerator, IEnumerable<SPFeature>, IEnumerable

Remarks

Instances of this type are returned by the QueryFeatures method of the SPSite, SPContentDatabase, SPWebApplication, SPWebService, and SPSite classes.

To ensure that server memory is used efficiently, all objects used by an SPFeature object are subject to disposal when the IEnumerator.MoveNext() method is called. For example, if the SPFeature is scoped Site or Web, then the Parent property contains an SPSite or SPWeb object that may get disposed of when the MoveNext method is called. You should not use the supporting objects for a particular feature after the MoveNext method is called because they might be invalid.

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

SPFeatureQueryResultCollection Members

Microsoft.SharePoint Namespace