SocialFeed.Threads - Propriété
Obtient les threads qui composent le flux.
Espace de noms : Microsoft.SharePoint.Client.Social
Assemblys : Microsoft.SharePoint.Client.UserProfiles.Silverlight (dans Microsoft.SharePoint.Client.UserProfiles.Silverlight.dll); Microsoft.SharePoint.Client.UserProfiles.Phone (dans Microsoft.SharePoint.Client.UserProfiles.Phone.dll) Microsoft.SharePoint.Client.UserProfiles (dans Microsoft.SharePoint.Client.UserProfiles.dll)
Syntaxe
'Déclaration
Public ReadOnly Property Threads As SocialThread()
Get
'Utilisation
Dim instance As SocialFeed
Dim value As SocialThread()
value = instance.Threads
public SocialThread[] Threads { get; }
Valeur de propriété
Type : []
Exemples
Le code suivant parcourt les threads dans le flux. Il obtient l'identificateur de thread et le texte du billet racine et vérifie si chaque thread a l'attribut CanReply .
Voir How to: Learn to read and write to the social feed by using the .NET client object model et How to: Create and delete posts and retrieve the social feed by using the .NET client object model pour obtenir des exemples de code complet qui fonctionnent avec flux.
for (int i = 0; i < feed.Value.Threads.Length; i++)
{
SocialThread thread = feed.Value.Threads[i];
string threadId = thread.Id;
string postText = thread.RootPost.Text;
if (thread.Attributes.HasFlag(SocialThreadAttributes.CanReply))
{
Console.WriteLine(("\t" + threadId + " " + postText);
}
}