Repository to manage comments related to activities.
Inheritance
System.Object
ActivityCommentRepository
Assembly: EPiServer.dll
Version: 12.0.3
public abstract class ActivityCommentRepository : Object
Constructors
Declaration
protected ActivityCommentRepository()
Methods
Declaration
public void add_CommentCreated(AsyncEventHandler<CommentCreatedEventArgs> value)
Parameters
Declaration
public void add_CommentDeleted(AsyncEventHandler<CommentDeletedEventArgs> value)
Parameters
Declaration
public void add_CommentUpdated(AsyncEventHandler<CommentUpdatedEventArgs> value)
Parameters
Deletes an existing comment.
Declaration
public abstract Task<bool> DeleteAsync(long id)
Parameters
Type |
Name |
Description |
System.Int64 |
id |
The id of the comment
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
True if the comment was deleted else false.
|
Lists all comments related to a list of Activity.
Declaration
public virtual Task<IEnumerable<ActivityComment>> ListAsync(IEnumerable<long> activityIDs)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<System.Int64> |
activityIDs |
The ids of the activities.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ActivityComment>> |
A list of comments related to the provided activities.
|
Lists all comments related to a specific Activity.
Declaration
public abstract Task<IEnumerable<ActivityComment>> ListAsync(long activityID)
Parameters
Type |
Name |
Description |
System.Int64 |
activityID |
The id of the activity.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ActivityComment>> |
A list of comments related to the provided activity.
|
Load the comment with given id.
Declaration
public abstract Task<ActivityComment> LoadAsync(long id)
Parameters
Type |
Name |
Description |
System.Int64 |
id |
The id for the comment to load.
|
Returns
Declaration
protected virtual Task OnCommentCreated(CommentCreatedEventArgs e)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Declaration
protected virtual Task OnCommentDeleted(CommentDeletedEventArgs e)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Declaration
protected virtual Task OnCommentUpdated(CommentUpdatedEventArgs e)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Declaration
public void remove_CommentCreated(AsyncEventHandler<CommentCreatedEventArgs> value)
Parameters
Declaration
public void remove_CommentDeleted(AsyncEventHandler<CommentDeletedEventArgs> value)
Parameters
Declaration
public void remove_CommentUpdated(AsyncEventHandler<CommentUpdatedEventArgs> value)
Parameters
Saves a new or existing comment.
Declaration
public abstract Task<long> SaveAsync(ActivityComment comment)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Int64> |
|
Events
Occurs when a new comment on an Activity is added to the activity log.
Declaration
public event AsyncEventHandler<CommentCreatedEventArgs> CommentCreated
Event Type
Occurs when a comment on an Activity is deleted from the activity log.
Declaration
public event AsyncEventHandler<CommentDeletedEventArgs> CommentDeleted
Event Type
Occurs when an existing comment on an Activity is changed to the activity log.
Declaration
public event AsyncEventHandler<CommentUpdatedEventArgs> CommentUpdated
Event Type
Extension Methods