November Happy Hour will be moved to Thursday December 5th.

Class ActivityCommentRepository

Repository to manage comments related to activities.

Inheritance
System.Object
ActivityCommentRepository
Namespace: EPiServer.DataAbstraction.Activities
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public abstract class ActivityCommentRepository : Object

Constructors

ActivityCommentRepository()

Declaration
protected ActivityCommentRepository()

Methods

add_CommentCreated(AsyncEventHandler<CommentCreatedEventArgs>)

Declaration
public void add_CommentCreated(AsyncEventHandler<CommentCreatedEventArgs> value)
Parameters
Type Name Description
AsyncEventHandler<CommentCreatedEventArgs> value

add_CommentDeleted(AsyncEventHandler<CommentDeletedEventArgs>)

Declaration
public void add_CommentDeleted(AsyncEventHandler<CommentDeletedEventArgs> value)
Parameters
Type Name Description
AsyncEventHandler<CommentDeletedEventArgs> value

add_CommentUpdated(AsyncEventHandler<CommentUpdatedEventArgs>)

Declaration
public void add_CommentUpdated(AsyncEventHandler<CommentUpdatedEventArgs> value)
Parameters
Type Name Description
AsyncEventHandler<CommentUpdatedEventArgs> value

DeleteAsync(Int64)

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.

ListAsync(IEnumerable<Int64>)

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.

ListAsync(Int64)

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.

LoadAsync(Int64)

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
Type Description
System.Threading.Tasks.Task<ActivityComment>

The comment.

OnCommentCreated(CommentCreatedEventArgs)

Called to raise event CommentCreated

Declaration
protected virtual Task OnCommentCreated(CommentCreatedEventArgs e)
Parameters
Type Name Description
CommentCreatedEventArgs e

The event argument

Returns
Type Description
System.Threading.Tasks.Task

OnCommentDeleted(CommentDeletedEventArgs)

Called to raise event CommentDeleted

Declaration
protected virtual Task OnCommentDeleted(CommentDeletedEventArgs e)
Parameters
Type Name Description
CommentDeletedEventArgs e

The event argument

Returns
Type Description
System.Threading.Tasks.Task

OnCommentUpdated(CommentUpdatedEventArgs)

Called to raise event CommentUpdated

Declaration
protected virtual Task OnCommentUpdated(CommentUpdatedEventArgs e)
Parameters
Type Name Description
CommentUpdatedEventArgs e

The event argument

Returns
Type Description
System.Threading.Tasks.Task

remove_CommentCreated(AsyncEventHandler<CommentCreatedEventArgs>)

Declaration
public void remove_CommentCreated(AsyncEventHandler<CommentCreatedEventArgs> value)
Parameters
Type Name Description
AsyncEventHandler<CommentCreatedEventArgs> value

remove_CommentDeleted(AsyncEventHandler<CommentDeletedEventArgs>)

Declaration
public void remove_CommentDeleted(AsyncEventHandler<CommentDeletedEventArgs> value)
Parameters
Type Name Description
AsyncEventHandler<CommentDeletedEventArgs> value

remove_CommentUpdated(AsyncEventHandler<CommentUpdatedEventArgs>)

Declaration
public void remove_CommentUpdated(AsyncEventHandler<CommentUpdatedEventArgs> value)
Parameters
Type Name Description
AsyncEventHandler<CommentUpdatedEventArgs> value

SaveAsync(ActivityComment)

Saves a new or existing comment.

Declaration
public abstract Task<long> SaveAsync(ActivityComment comment)
Parameters
Type Name Description
ActivityComment comment

The comment to save.

Returns
Type Description
System.Threading.Tasks.Task<System.Int64>

Events

CommentCreated

Occurs when a new comment on an Activity is added to the activity log.

Declaration
public event AsyncEventHandler<CommentCreatedEventArgs> CommentCreated
Event Type
Type Description
AsyncEventHandler<CommentCreatedEventArgs>

CommentDeleted

Occurs when a comment on an Activity is deleted from the activity log.

Declaration
public event AsyncEventHandler<CommentDeletedEventArgs> CommentDeleted
Event Type
Type Description
AsyncEventHandler<CommentDeletedEventArgs>

CommentUpdated

Occurs when an existing comment on an Activity is changed to the activity log.

Declaration
public event AsyncEventHandler<CommentUpdatedEventArgs> CommentUpdated
Event Type
Type Description
AsyncEventHandler<CommentUpdatedEventArgs>

Extension Methods