ActivityPreferencesCollection ActivityPreferencesCollection ActivityPreferencesCollection Class


This object, member, or enumeration is deprecated and is not intended to be used in your code. SharePoint 2013 includes the following APIs for working with feeds: .NET client, JavaScript, REST, and server. See Work with social feeds in SharePoint 2013 to choose the API for your specific feed-related programming tasks. Represents a collection of ActivityPreference objects.

public ref class ActivityPreferencesCollection : System::Collections::Generic::IEnumerable<Microsoft::Office::Server::ActivityFeed::ActivityPreference ^>
public class ActivityPreferencesCollection : System.Collections.Generic.IEnumerable<Microsoft.Office.Server.ActivityFeed.ActivityPreference>
Public Class ActivityPreferencesCollection
Implements IEnumerable(Of ActivityPreference)


The ActivityPreferences property of ActivityManager is an ActivityPreferencesCollection object. Use this property to get and set preferences for a social entity.


Count Count Count

Gets a count of items in the collection.

Item[Int64] Item[Int64] Item[Int64]

Gets an ActivityPreference object for the ActivityType with the specified identifier.


Clear() Clear() Clear()

Removes all elements from the collection.

Commit() Commit() Commit()

Commits data in the collection to the database.

Create(Int64) Create(Int64) Create(Int64)

Creates a new ActivityPreference object for the ActivityType object with the specified identifier and returns it.

GetActivityPreferencesPerType() GetActivityPreferencesPerType() GetActivityPreferencesPerType()

Gets the current user’s preferences for each ActivityType object managed by the ActivityManager object.

GetEnumerator() GetEnumerator() GetEnumerator()

Gets an enumerator for iterating through the collection.

Refresh() Refresh() Refresh()

Clears and repopulates the collection from the database.

Remove(ActivityPreference) Remove(ActivityPreference) Remove(ActivityPreference)

Removes the specified ActivityPreference object from the collection.

SetActivityPreferencesPerType(List<ActivityPreferencePerType>) SetActivityPreferencesPerType(List<ActivityPreferencePerType>) SetActivityPreferencesPerType(List<ActivityPreferencePerType>)

Sets the current user's preferences for each ActivityType object managed by the ActivityManager.

Explicit Interface Implementations

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Extension Methods

ToJson(Object) ToJson(Object) ToJson(Object)

Applies to