Table of Contents

Interface ICommentCollection

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

Public interface to define a collection of comment objects.

public interface ICommentCollection : IQueryable<IComment>, IQueryable, IDataModelCollection<IComment>, IEnumerable<IComment>, IEnumerable, IDataModelParent, IDataModelWithContext, IRequestableCollection, ISupportModules<ICommentCollection>
Inherited Members
Extension Methods

Methods

Add(string)

Adds a comment to a list item.

IComment Add(string text)

Parameters

text string

Comment to add

Returns

IComment

Newly added comment

AddAsync(string)

Adds a comment to a list item.

Task<IComment> AddAsync(string text)

Parameters

text string

Comment to add

Returns

Task<IComment>

Newly added comment

AddBatch(Batch, string)

Adds a comment to a list item.

IComment AddBatch(Batch batch, string text)

Parameters

batch Batch

Batch to use

text string

Comment to add

Returns

IComment

Newly added comment

AddBatch(string)

Adds a comment to a list item.

IComment AddBatch(string text)

Parameters

text string

Comment to add

Returns

IComment

Newly added comment

AddBatchAsync(Batch, string)

Adds a comment to a list item.

Task<IComment> AddBatchAsync(Batch batch, string text)

Parameters

batch Batch

Batch to use

text string

Comment to add

Returns

Task<IComment>

Newly added comment

AddBatchAsync(string)

Adds a comment to a list item.

Task<IComment> AddBatchAsync(string text)

Parameters

text string

Comment to add

Returns

Task<IComment>

Newly added comment

DeleteAll()

Delete all comments in this collection.

void DeleteAll()

DeleteAllAsync()

Delete all comments in this collection.

Task DeleteAllAsync()

Returns

Task

GetAtMentioningString(string, string, string)

Constructs the at mentioning string to be used when at mentioning someone in a comment or reply

string GetAtMentioningString(string userName, string userPrincipalName, string email = null)

Parameters

userName string

Name of the user to show in front of the @ (e.g. @Bert)

userPrincipalName string

The UPN of the user represented in the at mentioning

email string

The email of the user represented in the at mentioning. If not specified the UPN is used for email as well

Returns

string

The formatted at mentioning html