Table of Contents

Interface IComment

Namespace
PnP.Core.Model.SharePoint
Assembly
PnP.Core.dll

Public interface to define a comment.

public interface IComment : IDataModel<IComment>, IDataModelParent, IDataModelWithContext, ISupportModules<IComment>, IDataModelGet<IComment>, IDataModelLoad<IComment>, IDataModelDelete, IQueryableDataModel
Inherited Members
Extension Methods

Properties

All

A special property used to add an asterisk to a $select statement

object All { get; }

Property Value

object

Author

Comment author.

ISharePointSharingPrincipal Author { get; }

Property Value

ISharePointSharingPrincipal

CreatedDate

Comment creation date.

DateTime CreatedDate { get; }

Property Value

DateTime

Id

Comment id.

string Id { get; }

Property Value

string

IsLikedByUser

Flag that indicates whether the user in the current context liked the comment.

bool IsLikedByUser { get; }

Property Value

bool

IsReply

Comment is a reply to another comment.

bool IsReply { get; }

Property Value

bool

ItemId

Comment item id.

int ItemId { get; }

Property Value

int

LikeCount

Number of likes for the comment.

int LikeCount { get; }

Property Value

int

LikedBy

List of users who have liked the comment. Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

ICommentLikeUserEntityCollection LikedBy { get; }

Property Value

ICommentLikeUserEntityCollection

ListId

Comment list id.

Guid ListId { get; }

Property Value

Guid

Mentions

List of users who are at mentioned in this comment. Implements IQueryable<T>.
See Requesting model collections and IQueryable performance considerations to learn more.

ICommentLikeUserEntityCollection Mentions { get; }

Property Value

ICommentLikeUserEntityCollection

ParentId

Comment parent ID (0 if not a reply).

string ParentId { get; }

Property Value

string

RelativeCreatedDate

Gets a string that represents the relative value of the comment's creation date.

string RelativeCreatedDate { get; }

Property Value

string

Replies

Replies to the comment.

ICommentCollection Replies { get; }

Property Value

ICommentCollection

ReplyCount

Number of replies to the comment.

int ReplyCount { get; }

Property Value

int

Text

Comment text.

string Text { get; set; }

Property Value

string

Methods

Like()

Likes the comment for the user in the current context.

void Like()

LikeAsync()

Likes the comment for the user in the current context.

Task LikeAsync()

Returns

Task

Unlike()

Unlikes the comment for the user in the current context.

void Unlike()

UnlikeAsync()

Unlikes the comment for the user in the current context.

Task UnlikeAsync()

Returns

Task