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

Class ActivityCommentRepository

Repository to manage comments related to activities.

Inheritance
System.Object
ActivityCommentRepository
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.DataAbstraction.Activities
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public abstract class ActivityCommentRepository

Constructors

ActivityCommentRepository()

Declaration
protected ActivityCommentRepository()

Methods

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 void OnCommentCreated(CommentCreatedEventArgs e)
Parameters
Type Name Description
CommentCreatedEventArgs e

The event argument

OnCommentDeleted(CommentDeletedEventArgs)

Called to raise event CommentDeleted

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

The event argument

OnCommentUpdated(CommentUpdatedEventArgs)

Called to raise event CommentUpdated

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

The event argument

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 EventHandler<CommentCreatedEventArgs> CommentCreated
Event Type
Type Description
System.EventHandler<CommentCreatedEventArgs>

CommentDeleted

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

Declaration
public event EventHandler<CommentDeletedEventArgs> CommentDeleted
Event Type
Type Description
System.EventHandler<CommentDeletedEventArgs>

CommentUpdated

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

Declaration
public event EventHandler<CommentUpdatedEventArgs> CommentUpdated
Event Type
Type Description
System.EventHandler<CommentUpdatedEventArgs>

Extension Methods