FeatureCollection-Klasse
Stellt eine Auflistung von Objekten SPFeature .
Vererbungshierarchie
System.Object
Microsoft.SharePoint.Client.ClientObject
Microsoft.SharePoint.Client.ClientObjectCollection
Microsoft.SharePoint.Client.ClientObjectCollection<Feature>
Microsoft.SharePoint.Client.FeatureCollection
Namespace: Microsoft.SharePoint.Client
Assemblys: Microsoft.SharePoint.Client.Silverlight (in Microsoft.SharePoint.Client.Silverlight.dll); Microsoft.SharePoint.Client.Phone (in Microsoft.SharePoint.Client.Phone.dll) Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
Public NotInheritable Class FeatureCollection _
Inherits ClientObjectCollection(Of Feature)
'Usage
Dim instance As FeatureCollection
public sealed class FeatureCollection : ClientObjectCollection<Feature>
Beispiele
In diesem Codebeispiel zeigt die Bezeichner der aktiven Features der aktuellen Website an.
using System;
using Microsoft.SharePoint.Client;
namespace Microsoft.SDK.SharePointFoundation.Samples
{
class FeatureCollectionExample
{
static void Main()
{
string siteUrl = "http://MyServer/sites/MySiteCollection";
ClientContext clientContext = new ClientContext(siteUrl);
Web site = clientContext.Web;
FeatureCollection collFeature = site.Features;
clientContext.Load(collFeature);
clientContext.ExecuteQuery();
foreach (Feature oneFeature in collFeature)
Console.WriteLine("Feature ID: {0}", oneFeature.DefinitionId);
}
}
}
Threadsicherheit
Alle öffentlichen static (Shared in Visual Basic) Member dieses Typs sind threadsicher. Die Threadsicherheit von Instanzmembern ist nicht gewährleistet.