Class ProjectActivityFeed
A feed to read activities related to a project. Can be used to retrieve project activities or to subscribe to changes.
Inheritance
Namespace: EPiServer.DataAbstraction.Activities
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public abstract class ProjectActivityFeed : Object
Constructors
ProjectActivityFeed()
Declaration
protected ProjectActivityFeed()
Properties
Instance
Gets the currently configured instance of the Project
Declaration
public static ProjectActivityFeed Instance { get; }
Property Value
Type | Description |
---|---|
Project |
Methods
add_ActivityCreated(AsyncEventHandler<ProjectActivityCreatedEventArgs>)
Declaration
public void add_ActivityCreated(AsyncEventHandler<ProjectActivityCreatedEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
Async |
value |
add_ActivityDeleted(AsyncEventHandler<ProjectActivityDeletedEventArgs>)
Declaration
public void add_ActivityDeleted(AsyncEventHandler<ProjectActivityDeletedEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
Async |
value |
add_ActivityUpdated(AsyncEventHandler<ProjectActivityUpdatedEventArgs>)
Declaration
public void add_ActivityUpdated(AsyncEventHandler<ProjectActivityUpdatedEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
Async |
value |
ListActivitiesAsync(ContentReference, Int32)
List all Activity instances for a content version that is related to a project.
Declaration
public abstract Task<IEnumerable<Activity>> ListActivitiesAsync(ContentReference contentLink, int projectId)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentLink | The content to get project related activities for |
System. |
projectId | The related project |
Returns
Type | Description |
---|---|
System. |
A list of activities related to the content version and project |
Remarks
Will only return content related activities that has occured after the version was added to the project.
ListActivitiesAsync(Int32)
Declaration
public virtual Task<IEnumerable<Activity>> ListActivitiesAsync(int projectId)
Parameters
Type | Name | Description |
---|---|---|
System. |
projectId | The identity of the project to load activities for. |
Returns
Type | Description |
---|---|
System. |
All activities related to the project. |
ListActivitiesAsync(Int32, IEnumerable<ContentReference>)
List all Activity instances for a set of content versions that is related to a project.
Declaration
public virtual Task<IEnumerable<Activity>> ListActivitiesAsync(int projectId, IEnumerable<ContentReference> contentLinks)
Parameters
Type | Name | Description |
---|---|---|
System. |
projectId | The related project |
System. |
contentLinks | The content to get project related activities for |
Returns
Type | Description |
---|---|
System. |
Remarks
Will only return content related activities that has occured after the version was added to the project.
ListActivitiesAsync(Int32, IEnumerable<ContentReference>, Int64, Int32)
List a paged set of Activity instances for a set of content versions that is related to a project.
Declaration
public virtual Task<PagedActivityResult> ListActivitiesAsync(int projectId, IEnumerable<ContentReference> contentLinks, long startIndex, int maxCount)
Parameters
Type | Name | Description |
---|---|---|
System. |
projectId | The related project |
System. |
contentLinks | The content to get project related activities for |
System. |
startIndex | The index for where only activities with a lower index will be returned. If no startIndex is given it will return the latest activities. |
System. |
maxCount | The maximum number of activities to return. |
Returns
Type | Description |
---|---|
System. |
Remarks
Will only return content related activities that has occured after the version was added to the project.
ListActivitiesAsync(Int32, Int64, Int32)
Declaration
public abstract Task<PagedActivityResult> ListActivitiesAsync(int projectId, long startIndex, int maxCount)
Parameters
Type | Name | Description |
---|---|---|
System. |
projectId | The identity of the project to load activities for. |
System. |
startIndex | The index for where only activities with a lower index will be returned. If no startIndex is given it will return the latest activities. |
System. |
maxCount | The maximum number of activities to return. |
Returns
Type | Description |
---|---|
System. |
All activities related to the project. |
Remarks
To get the latest activities set startIndex to 0 or long.MaxValue. In the next paged set as "index of last entry in previous set" - 1.
ListRelatedProjectsAsync(Int64)
List all projects related to the provided Activity.
Declaration
public abstract Task<IEnumerable<int>> ListRelatedProjectsAsync(long activityId)
Parameters
Type | Name | Description |
---|---|---|
System. |
activityId | The identity of the activity. |
Returns
Type | Description |
---|---|
System. |
A list of related project ids |
Remarks
Can be used for example from an event handler to Activity
LoadActivityAsync(Int64)
Loads a single Activity together with related comments.
Declaration
public abstract Task<Activity> LoadActivityAsync(long activityId)
Parameters
Type | Name | Description |
---|---|---|
System. |
activityId | The identity of the activity |
Returns
Type | Description |
---|---|
System. |
An activity |
OnActivityCreated(ProjectActivityCreatedEventArgs)
Called to raise event Activity
Declaration
protected virtual Task OnActivityCreated(ProjectActivityCreatedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Project |
e | The event argument |
Returns
Type | Description |
---|---|
System. |
OnActivityDeleted(ProjectActivityDeletedEventArgs)
Called to raise event Activity
Declaration
protected virtual Task OnActivityDeleted(ProjectActivityDeletedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Project |
e | The event argument |
Returns
Type | Description |
---|---|
System. |
OnActivityUpdated(ProjectActivityUpdatedEventArgs)
Called to raise event Activity
Declaration
protected virtual Task OnActivityUpdated(ProjectActivityUpdatedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Project |
e | The event argument |
Returns
Type | Description |
---|---|
System. |
remove_ActivityCreated(AsyncEventHandler<ProjectActivityCreatedEventArgs>)
Declaration
public void remove_ActivityCreated(AsyncEventHandler<ProjectActivityCreatedEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
Async |
value |
remove_ActivityDeleted(AsyncEventHandler<ProjectActivityDeletedEventArgs>)
Declaration
public void remove_ActivityDeleted(AsyncEventHandler<ProjectActivityDeletedEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
Async |
value |
remove_ActivityUpdated(AsyncEventHandler<ProjectActivityUpdatedEventArgs>)
Declaration
public void remove_ActivityUpdated(AsyncEventHandler<ProjectActivityUpdatedEventArgs> value)
Parameters
Type | Name | Description |
---|---|---|
Async |
value |
Events
ActivityCreated
Occurs when a new Activity is added to the activity log.
Declaration
public event AsyncEventHandler<ProjectActivityCreatedEventArgs> ActivityCreated
Event Type
Type | Description |
---|---|
Async |
ActivityDeleted
Occurs when an Activity is marked for deletion in the activity log.
Declaration
public event AsyncEventHandler<ProjectActivityDeletedEventArgs> ActivityDeleted
Event Type
Type | Description |
---|---|
Async |
ActivityUpdated
Occurs when an existing Activity in the activity log is updated.
Declaration
public event AsyncEventHandler<ProjectActivityUpdatedEventArgs> ActivityUpdated
Event Type
Type | Description |
---|---|
Async |