Compartilhar via


SocialFeed.Threads propriedade

Obtém os segmentos que constituem o feed.

Namespace:  Microsoft.SharePoint.Client.Social
Assemblies:   Microsoft.SharePoint.Client.UserProfiles.Silverlight (em Microsoft.SharePoint.Client.UserProfiles.Silverlight.dll);  Microsoft.SharePoint.Client.UserProfiles.Phone (em Microsoft.SharePoint.Client.UserProfiles.Phone.dll)  Microsoft.SharePoint.Client.UserProfiles (em Microsoft.SharePoint.Client.UserProfiles.dll)

Sintaxe

'Declaração
Public ReadOnly Property Threads As SocialThread()
    Get
'Uso
Dim instance As SocialFeed
Dim value As SocialThread()

value = instance.Threads
public SocialThread[] Threads { get; }

Valor de propriedade

Tipo: []

Exemplos

O código a seguir itera os threads no feed. Ele obtém o identificador de segmento e o texto da postagem raiz e verifica se cada thread tem o atributo CanReply .

Consulte How to: Learn to read and write to the social feed by using the .NET client object model e How to: Create and delete posts and retrieve the social feed by using the .NET client object model para obter exemplos de código completo que funcionam com feeds.

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);
    }
}

Ver também

Referência

SocialFeed classe

SocialFeed membros

Microsoft.SharePoint.Client.Social namespace